Dapper.FluentMap
3.6.1
dotnet add package Dapper.FluentMap --version 3.6.1
NuGet\Install-Package Dapper.FluentMap -Version 3.6.1
<PackageReference Include="Dapper.FluentMap" Version="3.6.1" />
<PackageVersion Include="Dapper.FluentMap" Version="3.6.1" />
<PackageReference Include="Dapper.FluentMap" />
paket add Dapper.FluentMap --version 3.6.1
#r "nuget: Dapper.FluentMap, 3.6.1"
#:package Dapper.FluentMap@3.6.1
#addin nuget:?package=Dapper.FluentMap&version=3.6.1
#tool nuget:?package=Dapper.FluentMap&version=3.6.1
FluentMap
<p align="center"> <img src="website/public/social/fluentmap-social.png" alt="Dapper FluentMap — Map your data. Keep your models clean." width="1200"> </p>
<p align="center"><strong>Map your data. Keep your models clean.</strong></p>
<p align="center"> English · <a href="README.pt-BR.md">Português (Brasil)</a> </p>
<p align="center"> <a href="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/actions/workflows/ci.yml/badge.svg?branch=main"></a> <a href="https://www.nuget.org/packages/Dapper.FluentMap"><img alt="NuGet" src="https://img.shields.io/nuget/v/Dapper.FluentMap?logo=nuget"></a> <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/rodri-oliveira-dev/Dapper-FluentMap"></a> <a href="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/rodri-oliveira-dev/Dapper-FluentMap?style=flat&logo=github"></a> </p> <p align="center"> <a href="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/actions/workflows/codeql.yml"><img alt="CodeQL" src="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/actions/workflows/codeql.yml/badge.svg?branch=main"></a> <a href="https://sonarcloud.io/summary/new_code?id=rodri-oliveira-dev_Dapper-FluentMap"><img alt="Quality Gate" src="https://sonarcloud.io/api/project_badges/measure?project=rodri-oliveira-dev_Dapper-FluentMap&metric=alert_status"></a> <a href="https://sonarcloud.io/summary/new_code?id=rodri-oliveira-dev_Dapper-FluentMap"><img alt="Coverage" src="https://sonarcloud.io/api/project_badges/measure?project=rodri-oliveira-dev_Dapper-FluentMap&metric=coverage"></a> </p>
<p align="center"> <a href="website/src/content/docs/getting-started/index.md">Getting Started</a> · <a href="website/src/content/docs/index.mdx">Documentation</a> · <a href="https://www.nuget.org/packages/Dapper.FluentMap">NuGet</a> · <a href="website/src/content/docs/examples/index.md">Examples</a> · <a href="https://github.com/rodri-oliveira-dev/Dapper-FluentMap/releases">GitHub Releases</a> · <a href="#contributing">Contributing</a> </p>
FluentMap provides fluent, strongly typed mappings for applications that use Dapper. It connects .NET properties to database columns without adding persistence attributes to domain entities.
FluentMap complements Dapper; it does not replace it and is not a full ORM. SQL, connections, transactions, migrations, and entity tracking remain outside its scope.
Version status:
3.6.0is the latest published stable release. The repository is configured for3.6.1, which is the next release being prepared and is not published yet. Until publication, unversioned installation commands resolve to the latest version available on the selected package source.
Why FluentMap?
Imagine a .NET application with a Customer entity whose properties are Id and Name, while its database returns customer_id and customer_name. FluentMap keeps those physical column names in a dedicated, strongly typed map instead of coupling the entity to persistence details.
That gives you:
- cleaner domain models;
- strongly typed configuration;
- explicit, reusable mappings;
- direct integration with Dapper;
- support for reusable conventions;
- better organization of persistence code.
Quick Start
Install the core package and, for this self-contained SQLite example, the database provider:
dotnet add package Dapper.FluentMap
dotnet add package Microsoft.Data.Sqlite
Define the entity and its map, register it once during startup, then query normally with Dapper:
using Dapper;
using Dapper.FluentMap;
using Dapper.FluentMap.Mapping;
using Microsoft.Data.Sqlite;
FluentMapper.Initialize(config => config.AddMap<CustomerMap>());
FluentMapper.Validate();
using var connection = new SqliteConnection("Data Source=:memory:");
var customer = connection.QuerySingle<Customer>(
"SELECT 7 AS customer_id, 'Ada' AS customer_name;");
public sealed class Customer
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
}
public sealed class CustomerMap : EntityMap<Customer>
{
public CustomerMap()
{
Map(customer => customer.Id).ToColumn("customer_id");
Map(customer => customer.Name).ToColumn("customer_name");
}
}
Initialize the global configuration before concurrent queries and treat it as read-only afterward. See the Quick Start source if the planned portal is not yet deployed.
Key Features
| Feature | Scope | Learn more |
|---|---|---|
| Explicit property mapping | Core | EntityMap<T> and property mapping |
| Naming conventions | Core | Conventions |
| Immutable objects | Core | Immutable objects |
| Mapping profiles | Core | Mapping profiles |
| Runtime isolation | Core | FluentMapRuntime |
| Dependency Injection | Optional package | DI integration |
| Dommel integration | Optional package | Dommel integration |
| Source generators | Optional package | Source generators |
| Roslyn analyzers | Optional package | Roslyn analyzers |
The repository-local usage guide remains available as a fallback for detailed API examples.
Packages
| Package | Purpose |
|---|---|
Dapper.FluentMap |
Core mapping, conventions, profiles, materialization, and runtime APIs. |
Dapper.FluentMap.Dommel |
Optional Dommel metadata and persistence integration. |
FluentMap.DependencyInjection |
Registration of immutable configuration and isolated runtimes with Microsoft DI. |
FluentMap.Analyzers |
Roslyn diagnostics for statically detectable mapping problems. |
FluentMap.Generators |
Generated map registration and supported materializers. |
Package IDs are distribution identities. Assemblies, namespaces, and public APIs remain under Dapper.FluentMap.* where documented.
The current compatibility contract requires Dapper [2.1.89,3.0.0). This is a minimum-version range, not an exact pin: consumers may resolve a compatible Dapper 2.x release at or above 2.1.89. See Compatibility and Migration before upgrading an application that still uses Dapper 2.1.79.
Documentation
The bilingual documentation portal is planned for https://rodri-oliveira-dev.github.io/Dapper-FluentMap/. Until its deployment is confirmed, use the linked repository-local sources as fallbacks.
| Topic | Portal source | Repository guide |
|---|---|---|
| Getting Started | Start here | Quick Start |
| Basic Mapping | Property mapping | Usage guide |
| Advanced Mapping | Advanced mapping | Usage guide |
| Integrations | Integrations | Package overview |
| Examples | Examples | SQLite example |
| Migration Guide | Migration | MIGRATION.md |
| Compatibility | Compatibility matrix | COMPATIBILITY.md |
| API Reference | API overview | Configuration reference |
Project Status
FluentMap is actively maintained. The 3.x line preserves the main historical contracts—including EntityMap<T>, FluentMapper.Initialize(...), and the Dapper type-map bridge—while newer capabilities remain opt-in. Review the compatibility documentation before upgrading.
For published versions and release history, see GitHub Releases and the changelog.
Contributing
Contributions are welcome. You can report a bug or suggest an improvement, help improve the documentation, or submit a focused pull request.
If FluentMap helps your project, consider giving the repository a GitHub star.
License
FluentMap is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Dapper (>= 2.1.89 && < 3.0.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.14)
NuGet packages (34)
Showing the top 5 NuGet packages that depend on Dapper.FluentMap:
| Package | Downloads |
|---|---|
|
Dapper.FluentMap.Dommel
Dommel integration for Dapper.FluentMap that configures Dommel table, key, generated-column, and persistence metadata through fluent mappings. |
|
|
ZKWeb.ORM.Dapper
Support use Dapper in ZKWeb. For more information please visit project site. |
|
|
EcommerceDataPostgresql
PostgreSQL Data Layer |
|
|
Dapper.Dommel
Simple CRUD operations for Dapper. |
|
|
Hurb.SAP.Database
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Dapper.FluentMap:
| Repository | Stars |
|---|---|
|
zkweb-framework/ZKWeb
A flexible web framework supports .Net Framework and .Net Core
|
|
|
yorek/dapper-samples
Tutorial samples that shows how to use Dapper .NET
|
|
|
ardalis/DotNetDataAccessTour
A tour of different data access approaches in .NET 8+.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.6.1 | 446 | 10/29/2026 |
| 3.6.0 | 7,783 | 10/13/2026 |
| 3.5.0 | 6,397 | 10/1/2026 |
| 3.4.0 | 3,850 | 9/28/2026 |
| 3.0.3 | 11,485 | 9/10/2026 |
| 3.0.2 | 1,693 | 9/9/2026 |
| 3.0.0 | 2,008 | 9/8/2026 |
| 2.0.0 | 9,335,893 | 8/23/2020 |
| 1.8.1 | 1,006,885 | 5/5/2020 |
| 1.8.0 | 1,630,950 | 3/28/2019 |
| 1.7.0 | 501,964 | 11/16/2018 |
| 1.6.0 | 876,100 | 8/18/2017 |
| 1.5.4 | 16,800 | 8/17/2017 |
| 1.5.3 | 53,901 | 3/22/2017 |