Configuration & Integrations — SqlBuilder
Configure Roslyn generators, Dapper compiler registration, OpenTelemetry tracing, and pagination integration across the 2.0.0 packages.
When referencing EricksonLopez.SqlBuilder.SourceGenerators or EricksonLopez.SqlBuilder.Analyzers directly via ProjectReference or PackageReference, ensure analyzer metadata is configured (OutputItemType="Analyzer" ReferenceOutputAssembly="false" for project references). NuGet PackageReference sets PrivateAssets="all" automatically.
Dapper, Pagination & OpenTelemetry Integrations
Section titled “Dapper, Pagination & OpenTelemetry Integrations”EricksonLopez.SqlBuilder.Dapper(IncompatibleAOT): Register the dialect compiler once at startup viaDapperExtensions.RegisterCompiler<NpgsqlConnection>(() => new PostgreSqlCompiler()), then callconnection.QueryAsync<T>(query),QueryStreamAsync<T>, orQueryAotAsync<T>(query, mapper).EricksonLopez.SqlBuilder.Dapper.Aot(FullAOT): Execute pre-compiledSqlResultcommands withAotDapperExtensions.AotQueryAsync(connection, SqlResult, mapper).EricksonLopez.SqlBuilder.Pagination(FullAOT): UseSqlBuilderPaginationExtensions.Paginate<T>(query, parameters)andApplyCursor<T, TKey>(query, parameters, keySelector, ascending: false)together withToPagedList<T>/ToCursorPagedList<T, TKey>.EricksonLopez.SqlBuilder.OpenTelemetry(FullAOT): Start query spans viaSqlBuilderInstrumentation.StartQueryActivity(ISqlQuery, dbName, compiler)(ActivitySourceName = "EricksonLopez.SqlBuilder").