Skip to content

Source Generators

Required package: FluentMap.Generators

Generate mapping registration and supported materializers at build time.

Use this capability when the column shape and .NET model should remain separated by explicit, reviewable configuration.

Terminal window
dotnet add package FluentMap.Generators
// Startup
config.AddGeneratedMappings();

FluentMap registers typed metadata and applies it through the matching materialization path. SQL, connections, parameters, and lifecycle remain responsibilities of the application and Dapper.

For consumer targets with NET6_0_OR_GREATER, eligible generated materializers emit the same verified date/time conversions as the runtime path. Older target frameworks receive no invalid DateOnly or TimeOnly references. Strict-generated Native AOT evidence covers the SQLite generated path, nullable date/time properties and explicit property converters; unsupported shapes fail instead of entering runtime fallback.