SQLEngine 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SQLEngine --version 1.0.0
NuGet\Install-Package SQLEngine -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SQLEngine" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SQLEngine --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SQLEngine, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SQLEngine as a Cake Addin #addin nuget:?package=SQLEngine&version=1.0.0 // Install SQLEngine as a Cake Tool #tool nuget:?package=SQLEngine&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SQLEngine
SQL Engine is a library that eases of generating sql queries You can build (almost) any sql query with C# expressions One of the examples :
//demonstration of create-table query
using (var b = Query.New)
{
string sqlQuery = b._create.Table("Employees")
.Columns(c => new[]
{
c.Long("ID").Identity(),
c.Long("UserID")
.ForeignKey("USERS", "ID").NotNull(),
c.String("Name").MaxLength(50).Unique(),
c.Decimal("Weight"),
//custom column with all props
c.Column("Age").Type("INT").Check("Age>1 && Age<100"),
c.Datetime("BirthDate").DefaultValue("GETDATE()"),
c.Bool("HasDriverLicense"),
// two column index
c.Int("Amount1").Unique("IX_Amount1_Amount2",descending:true),
c.Int("Amount2").Unique("IX_Amount1_Amount2"),
//calculated column
c.Column("Sum").CalculatedColumn("Amount1 + Amount2"),
}).ToString();
//then execute it
ExecuteRawSql(sqlQuery);
}
You can see other examples (select,insert update,delete,drop,if-else,truncate and so on ) in SqlServer.Tests section
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SQLEngine:
Package | Downloads |
---|---|
SQLEngine.SqlServer
Cross Database Sql query generator using C# expressions, Sql-Server Adapter |
GitHub repositories
This package is not used by any popular GitHub repositories.