Dapper.FluentMap.Dommel 3.0.3

dotnet add package Dapper.FluentMap.Dommel --version 3.0.3
                    
NuGet\Install-Package Dapper.FluentMap.Dommel -Version 3.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dapper.FluentMap.Dommel" Version="3.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dapper.FluentMap.Dommel" Version="3.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Dapper.FluentMap.Dommel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dapper.FluentMap.Dommel --version 3.0.3
                    
#r "nuget: Dapper.FluentMap.Dommel, 3.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dapper.FluentMap.Dommel@3.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dapper.FluentMap.Dommel&version=3.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Dapper.FluentMap.Dommel&version=3.0.3
                    
Install as a Cake Tool

FluentMap

CI Quality Gate Status .NET Standard 2.0 Coverage License: MIT GitHub stars

English | Português (Brasil)

FluentMap is an advanced mapping layer for Dapper. It lets you describe how .NET object properties map to database columns with fluent, strongly typed code, while keeping persistence attributes out of your POCOs.

FluentMap is not an ORM. It does not track entities, build arbitrary SQL, manage connections, run migrations, provide LINQ, or replace Dapper. Use it when Dapper's default name-based mapping is not enough and the mapping rules should live outside the model.

Project Status

Dapper.FluentMap is being actively modernized again. Version 3.0 continues the original project history while preserving the core FluentMap mapping model and compatibility path.

The 3.0 line modernizes the library and adds new opt-in capabilities without turning FluentMap into an ORM or requiring existing applications to adopt the new APIs.

Coming from FluentMap 2.x?

If you used FluentMap before and are returning to the project, the important compatibility points are:

  • existing EntityMap<T> mappings remain supported;
  • FluentMapper.Initialize(...) remains supported;
  • normal Dapper.Query<T>() calls continue to work with root-level mappings installed through the historical static API;
  • most existing root-level maps should not need source changes;
  • most 3.0 capabilities are opt-in, so you do not need to rewrite working mappings just because newer APIs exist.

See MIGRATION.md for the recommended 2.x to 3.0 migration path and the behavioral differences worth reviewing.

What's New in 3.0

FluentMap 3.0 modernizes the original project without changing its core purpose. In addition to the historical fluent mapping API, the 3.0 line adds opt-in support for:

  • immutable constructor mapping improvements;
  • nested object and value object materialization;
  • mapping profiles for alternate SQL shapes;
  • mapped QueryMultiple, unbuffered reads and async streaming;
  • property conversion metadata and diagnostics;
  • source-generated map registration and supported materializers;
  • Roslyn analyzers for mapping diagnostics;
  • isolated immutable configuration and dependency injection;
  • richer persistence metadata consumed by the Dommel integration;
  • trimming/AOT-aware registration and diagnostics;
  • modern compatibility tests, provider harnesses, benchmarks, CI and package validation.

Existing mappings remain the compatibility baseline. Adopt the newer APIs only when they solve a concrete problem.

Positioning

Use FluentMap for:

  • explicit property-to-column maps;
  • conventions and naming policies;
  • ignored properties;
  • immutable constructor mapping;
  • opt-in nested object and value object materialization;
  • mapping profiles for alternate SQL shapes;
  • generated map registration/materialization where supported;
  • persistence metadata consumed by integrations such as Dommel;
  • isolated configuration and dependency injection for FluentMap-controlled materialization.

Do not use FluentMap as an ORM, CRUD framework, query builder, unit of work, or database abstraction.

Installation

Install the package that matches the feature set you need:

Package purpose NuGet PackageId