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 coexists cleanly with Dapper on the same connection and transaction.

Get started

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 the method body. sqlbound prepare verifies the query against your schema and commits an offline snapshot, so the in-IDE analyzer validates without a live database connection.