Emm.SqlStringGenerator 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Emm.SqlStringGenerator --version 0.0.1
                    
NuGet\Install-Package Emm.SqlStringGenerator -Version 0.0.1
                    
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="Emm.SqlStringGenerator" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Emm.SqlStringGenerator" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Emm.SqlStringGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Emm.SqlStringGenerator --version 0.0.1
                    
#r "nuget: Emm.SqlStringGenerator, 0.0.1"
                    
#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.
#:package Emm.SqlStringGenerator@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Emm.SqlStringGenerator&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Emm.SqlStringGenerator&version=0.0.1
                    
Install as a Cake Tool

SqlStrings Source Generator

C# Source Generator that transforms .sql files in your project into statically-typed C# classes and fields.

Installation

dotnet add package Emm.SqlStringGenerator 

Example

create sql file

--namespace: Org.MyAppNamespace
--class: Queries
--classModifier: public

--name: CountTable
SELECT COUNT(*) FROM Table

--name: DeleteTable
DELETE FROM Table WHERE Id = @Id

include in your .csproj

<ItemGroup>
    <AdditionalFiles Include="Queries.sql" /> 
</ItemGroup>

use in your code

Console.WriteLine(Org.MyAppNamespace.Queries.CountTable);
//or 
Connection.Execute(Org.MyAppNamespace.Queries.DeleteTable, new { Id = 5 });
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2.1 352 12/14/2023
0.0.2 203 12/14/2023
0.0.1 209 12/14/2023