PostgreSQL Example
Required packages:
Dapper.FluentMap,Npgsql
Problem solved
Section titled “Problem solved”Apply FluentMap above an Npgsql connection and explicit SQL aliases.
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”await using var connection = new NpgsqlConnection(connectionString);var rows = connection.Query<Customer>( "SELECT customer_id, customer_name FROM customers");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.