Skip to content

Dapper FluentMap documentation

Dapper FluentMap · .NET

Map your data. Keep your models clean.

Add fluent, strongly typed mapping to Dapper without persistence attributes in your POCOs. FluentMap complements Dapper; it does not replace Dapper or aim to become a full ORM.

Explicit mapping where it helps

A small, predictable layer between your objects and the names exposed by the database.

Fluent property mapping

Connect properties and columns through a clear API.

Strongly typed configuration

C# expressions keep mappings close to the compiler.

Clean domain models

Keep persistence attributes out of your domain.

Mapping conventions

Apply repeatable rules and naming policies.

Immutable objects

Materialize constructors and factories on supported paths.

Dapper integration

Keep using Dapper connections, SQL, and queries.

Optional generation

Register mappings and supported materializers at build time.

Diagnostics

Validate configuration at runtime and with optional analyzers.

From model to query in three files

This example uses verified core-package APIs. Switch tabs, copy a file, and continue with the full guide.

Package: Dapper.FluentMap
public sealed class Customer
{
    public int Id { get; set; }
    public string Name { get; set; } = string.Empty;
}

Built for real systems

Use FluentMap when the database schema and application model need to evolve with separate responsibilities.

Legacy databases

Map old column names without changing your entities.

Different conventions

Bridge PascalCase, snake_case, and schema-specific names.

ASP.NET Core

Use isolated configuration and DI integration.

Multiple providers

Keep mapping above the ADO.NET provider layer.

Choose your next step

The documentation progresses from your first mapping through materialization, integration, and migration.

Help FluentMap get even better.

Report bugs, propose improvements, share examples, or contribute code and documentation. If the project helps your work, a star makes it easier for other developers to find.