Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder 1.0.0-alpha-2

This is a prerelease version of Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.
dotnet add package Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder --version 1.0.0-alpha-2                
NuGet\Install-Package Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder -Version 1.0.0-alpha-2                
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="Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder" Version="1.0.0-alpha-2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder --version 1.0.0-alpha-2                
#r "nuget: Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder, 1.0.0-alpha-2"                
#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 Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder as a Cake Addin
#addin nuget:?package=Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder&version=1.0.0-alpha-2&prerelease

// Install Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder as a Cake Tool
#tool nuget:?package=Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder&version=1.0.0-alpha-2&prerelease                

Infrastructure.Data.QueryBuilder

Infrastructure Data Query Builder library used in projects created by the Code Generator tool.

This project contains abstract classes for implementing and customizing query builder database providers.

Tolitech Code Generator Tool: http://www.tolitech.com.br

Examples:

SqlBuilderConfiguration.UseSqlServer();
SqlBuilderConfiguration.AddQueryBuilder("SqlServer");
SqlBuilderConfiguration.AddQueryBuilder("PostgreSql");
SqlBuilderConfiguration.AddQueryBuilder("MySql");
var person = new PersonEntity()
{
    PersonId = 1,
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Insert("dbo", "Person")
    .AddColumns(person)
    .Build();

string expected = "insert into [dbo].[Person] ([PersonId], [Name], [Age]) values (@PersonId, @Name, @Age);";
var person = new PersonEntity()
{
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Insert("Person")
    .AddColumns(person)
    .Identity("PersonId")
    .Build();

string expected = "insert into [dbo].[Person] ([Name], [Age]) values (@Name, @Age); select cast(SCOPE_IDENTITY() as int);";
var person = new PersonEntity()
{
    PersonId = 1,
    Name = "Person 1",
    Age = 18
};

string sql = new SqlBuilder()
    .Update("dbo", "Person")
    .AddColumns(person)
    .RemoveColumn(nameof(person.PersonId))
    .Where()
    .AddColumn(nameof(person.PersonId))
    .Build();

string expected = "update [dbo].[Person] set [Name] = @Name, [Age] = @Age where [PersonId] = @PersonId;";
string sql = new SqlBuilder()
    .Delete("dbo", "Person")
    .Where()
    .AddColumn("PersonId")
    .AddCondition("and [Age] > @Age")
    .Build();

string expected = "delete from [dbo].[Person] where [PersonId] = @PersonId and [Age] > @Age;";
string sql = new SqlBuilder()
    .Select("dbo", "Person")
    .AddColumns("PersonId", "Name")
    .Where()
    .AddColumn("PersonId")
    .AddCondition("and [Age] > @Age")
    .Build();

string expected = "select [PersonId], [Name] from [dbo].[Person] where [PersonId] = @PersonId and [Age] > @Age;";
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder:

Package Downloads
Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.SqlServer

Infrastructure Data Query Builder SQL Server library for Tolitech Code Generator.

Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.MySql

Infrastructure Data Query Builder MySQL library for Tolitech Code Generator.

Tolitech.CodeGenerator.Infrastructure.Data.QueryBuilder.PostgreSql

Infrastructure Data Query Builder PostgreSQL library for Tolitech Code Generator.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha-2 141 2/14/2022

More information at http://www.tolitech.com.br/