Skip to content

Mapping Profiles

Required package: Dapper.FluentMap

Select a mapping for a specific SQL shape without changing the default.

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

config.AddProfile<LegacyCustomerMap>();
var customer = connection.QueryMappedSingle<Customer, LegacyProfile>(sql);

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