Source Generators
Required package:
FluentMap.Generators
Problem solved
Section titled “Problem solved”Generate mapping registration and supported materializers at build time.
When to use it
Section titled “When to use it”Use this capability when the column shape and .NET model should remain separated by explicit, reviewable configuration.
Example
Section titled “Example”dotnet add package FluentMap.Generators
// Startupconfig.AddGeneratedMappings();How it works
Section titled “How it works”FluentMap registers typed metadata and applies it through the matching materialization path. SQL, connections, parameters, and lifecycle remain responsibilities of the application and Dapper.
Date/time and strict-generated behavior
Section titled “Date/time and strict-generated behavior”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.