SqlBound.Generators
1.0.0-rc.1
dotnet add package SqlBound.Generators --version 1.0.0-rc.1
NuGet\Install-Package SqlBound.Generators -Version 1.0.0-rc.1
<PackageReference Include="SqlBound.Generators" Version="1.0.0-rc.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="SqlBound.Generators" Version="1.0.0-rc.1" />
<PackageReference Include="SqlBound.Generators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add SqlBound.Generators --version 1.0.0-rc.1
#r "nuget: SqlBound.Generators, 1.0.0-rc.1"
#:package SqlBound.Generators@1.0.0-rc.1
#addin nuget:?package=SqlBound.Generators&version=1.0.0-rc.1&prerelease
#tool nuget:?package=SqlBound.Generators&version=1.0.0-rc.1&prerelease

SqlBound
Compile-time verified SQL for .NET. SqlBound checks your SQL against a real database schema at build time and materializes rows with a Roslyn source generator — no runtime reflection, no IL emit, Native AOT- and trimming-compatible.
It is designed to coexist with Dapper on the same DbConnection and DbTransaction: SqlBound
targets static, build-time-known queries; Dapper stays the tool for runtime-composed SQL. SqlBound
never owns or wraps connections and defines no Query*/Execute* extension methods, so the two
libraries share a project without conflict.
Example
using System.Data.Common;
using SqlBound;
public static partial class ItemQueries
{
[SqlQuery("SELECT Id FROM dbo.Items")]
public static partial Task<IReadOnlyList<int>> GetIdsAsync(DbConnection connection);
}
The generator emits straight-line DbDataReader code. The sqlbound prepare CLI step verifies each
query against your schema and commits an offline JSON snapshot, so the in-IDE analyzer validates
without a live database connection.
Packages
| Package | Purpose |
|---|---|
SqlBound |
Runtime core (dependency-free). |
SqlBound.Generators |
Source generator + analyzer (build-time only). |
SqlBound.Introspection |
Provider-neutral introspection contracts. |
SqlBound.Migrations |
SQL-file migration model and ledger. |
SqlBound.SqlServer · .Sqlite · .Npgsql · .MySql |
Per-provider introspection and type mapping. |
sqlbound (dotnet tool) |
CLI: prepare, verify, migrate, database. |
Providers
SQL Server, SQLite, PostgreSQL, and MySQL — query verification, reflection-free materialization, and SQL-file migrations, each reflecting what the underlying engine actually supports.
Documentation
- Guides, provider matrix, and API reference: https://lgamorim.github.io/sqlbound/
- Source, issues, and changelog: https://github.com/lgamorim/sqlbound
License
Copyright 2026 Luís Amorim. Licensed under the Apache License 2.0.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
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 |
|---|---|---|
| 1.0.0-rc.1 | 188 | 7/13/2026 |