/SqlToCsharp

A C# class generator from SQL CREATE TABLE Statements (SSDT)

Primary LanguageC#MIT LicenseMIT

SqlToCsharp

Target Platform is netcoreapp2.1, however dependent package Microsoft.SqlServer.TransactSql.ScriptDom is for .NET Framework 4.6. this means SqlToCsharp guaranteed to run on Windows but not for other platform.

confirm work on linux-x64 with sample project.

dotnet global tool

Install.

dotnet tool install -g SqlToCsharp

Run with samples.

dotnet-sqltocsharp ./samples/SqlToCsharpSampleDatabase ./samples/SqlToCsharpSampleConsoleApp SqlToCsharpSample

Single executable

Build Single executable.

windows

dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true

run with samples.

SqlToCsharp_win-x64.exe ./samples/SqlToCsharpSampleDatabase ./samples/SqlToCsharpSampleConsoleApp SqlToCsharpSample

linux

confirm work on linux-x64 (ubuntu 18.04).

dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true
./SqlToCsharp_linux-x64 ./samples/SqlToCsharpSampleDatabase ./samples/SqlToCsharpSampleConsoleApp SqlToCsharpSample

macOS

not-confirm on macos.

dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true
./SqlToCsharp_osx-x64 ./samples/SqlToCsharpSampleDatabase ./samples/SqlToCsharpSampleConsoleApp SqlToCsharpSample