EricksonLopez.DapperExtensions
dotnet-dapper-extensions · Data Access & Transactions
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
2. Value Proposition & Problem Solved#
High-performance, Native AOT-ready Dapper extensions for .NET: Unit of Work, nested savepoints, Polly v8 resilience, Roslyn source generators, and multi-provider bulk operations.
Vanilla Dapper leaves Unit of Work lifecycle, nested savepoints, transient retry poisoning, and dialect-specific bulk ingestion (PostgreSQL UNNEST, SqlBulkCopy) to ad-hoc boilerplate.
3. Quick Install#
Primary package: EricksonLopez.DapperExtensions
dotnet add package EricksonLopez.DapperExtensions --version 2.0.0<PackageReference Include="EricksonLopez.DapperExtensions" Version="2.0.0" /><PackageVersion Include="EricksonLopez.DapperExtensions" Version="2.0.0" />4. Verified Ecosystem Metrics#
Snapshot retrieved UTC: 2026-12-01
5. When to Use & When Not to Use#
When to use
- You build high-throughput Dapper repositories needing PostgreSQL UNNEST bulk operations, Unit of Work, savepoints, and Polly resilience.
When NOT to use
- You already rely exclusively on EF Core change tracking—use EF Core directly or EricksonLopez.Specification.EntityFramework.
6. Core Capabilities & Design Invariants#
Dialect-Native Bulk Ingestion
PostgreSQL UNNEST, SQL Server SqlBulkCopy, MySQL/MariaDB batching, and SQLite parameter batching.
Unit of Work, Savepoints & Analyzers
Async Unit of Work, MultiMapBuilder<T>, health checks, and Roslyn analyzers prohibiting dynamic Dapper anti-patterns.
7. Included NuGet Packages & Adapters#
| Package ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.DapperExtensionsPrimary | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 297 | High-performance, provider-agnostic Dapper extensions. Provides Unit of Work and Savepoints, fluent MultiMapBuilder supporting 8+ entities, and resilience pipeline integration via EricksonLopez.Resilience.Abstractions. Polly v8 pipelines (ResiliencePipeline) are supported via the IResiliencePipeline adapter. |
| EricksonLopez.DapperExtensions.PostgreSql | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 472 | High-performance Dapper extensions for PostgreSQL. Bulk insert and upsert via UNNEST (10-50x faster than row-by-row), paginated queries returning PagedList<T>, transaction helpers, and JSONB type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.DependencyInjection | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 155 | Dependency Injection extensions for EricksonLopez.DapperExtensions. Provides seamless registration for Dapper type handlers, transient error detectors, and resilience configurations in ASP.NET Core and .NET Generic Host. |
| EricksonLopez.DapperExtensions.MariaDb | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 151 | High-performance Dapper extensions for MariaDB. Bulk insert/upsert via multi-row VALUES, paginated queries returning PagedList<T>, transaction helpers, and JSON type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.Oracle | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 149 | High-performance Dapper extensions for Oracle Database. Bulk insert via INSERT ALL, paginated queries returning PagedList<T> with OFFSET FETCH NEXT, transaction helpers, and JSON type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.HealthChecks | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 144 | Database connectivity health checks for EricksonLopez.DapperExtensions across relational providers. |
| EricksonLopez.DapperExtensions.SqlServer | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 134 | High-performance Dapper extensions for SQL Server. Bulk insert via SqlBulkCopy, paginated queries returning PagedList<T> with OFFSET FETCH, transaction helpers, and JSON type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.OpenTelemetry | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 133 | OpenTelemetry tracing, metrics, and activity instrumentation for EricksonLopez.DapperExtensions. |
| EricksonLopez.DapperExtensions.MySql | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 130 | High-performance Dapper extensions for MySQL. Bulk insert/upsert via multi-row VALUES, paginated queries returning PagedList<T>, transaction helpers, and JSON type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.Sqlite | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 130 | High-performance Dapper extensions for SQLite. Bulk insert/upsert via multi-row VALUES, paginated queries returning PagedList<T>, transaction helpers, and JSON type handler. Designed for enterprise .NET applications using Clean Architecture. |
| EricksonLopez.DapperExtensions.SourceGeneratorsAnalyzer / Generator | Published | v2.0.0 / v3.1.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 141 | Roslyn source generator for zero-reflection Native AOT IDataReaderMapper implementations in EricksonLopez.DapperExtensions. |
| EricksonLopez.DapperExtensions.AnalyzersAnalyzer / Generator | Unpublished | — / v3.1.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 0 | Roslyn compile-time analyzers for EricksonLopez.DapperExtensions enforcing Native AOT safety and banning untyped dynamic Dapper queries (EL_DAP001). |
8. Quick Start Code Example#
Grounded in verified public APIs from EricksonLopez.DapperExtensions. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.
using EricksonLopez.DapperExtensions.DependencyInjection;
using Microsoft.AspNetCore.Builder;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDapperExtensions(options =>
{
options.RegisterStandardTypeHandlers = true;
options.RegisterTransientErrorDetectors = true;
});9. Architecture & Dependency Flow#
Rendering diagram…
flowchart LR lib_dapper_extensions["EricksonLopez.DapperExtensions (L3)"] lib_pagination["EricksonLopez.Pagination (L2)"] lib_dapper_extensions --> lib_pagination lib_resilience["EricksonLopez.Resilience (L2)"] lib_dapper_extensions -.-> lib_resilience lib_sql_builder["EricksonLopez.SqlBuilder (L3)"] lib_dapper_extensions -.-> lib_sql_builder
View accessible text summary and structure
3 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
| Direction | Library | Tier | Relationship Kinds |
|---|---|---|---|
| Upstream | EricksonLopez.Pagination | L2 | Adapter, Compile-Time, NuGet Package |
| Upstream | EricksonLopez.Resilience | L2 | Adapter, NuGet Package |
| Upstream | EricksonLopez.SqlBuilder | L3 | Adapter, NuGet Package |
flowchart LR
lib_dapper_extensions["EricksonLopez.DapperExtensions (L3)"]
lib_pagination["EricksonLopez.Pagination (L2)"]
lib_dapper_extensions --> lib_pagination
lib_resilience["EricksonLopez.Resilience (L2)"]
lib_dapper_extensions -.-> lib_resilience
lib_sql_builder["EricksonLopez.SqlBuilder (L3)"]
lib_dapper_extensions -.-> lib_sql_builder10. Target Frameworks & Native AOT / Trimming Matrix#
MSBuild `.csproj` inspection across 12 packages: 10 Full, 0 Partial, 0 Incompatible, 2 NotApplicable (analyzers/generators).
| Package ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.DapperExtensions | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.PostgreSql | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.DependencyInjection | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.MariaDb | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.Oracle | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.HealthChecks | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.SqlServer | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.OpenTelemetry | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.MySql | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.Sqlite | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.DapperExtensions.SourceGenerators | null | false | NotApplicable | netstandard2.0 |
| EricksonLopez.DapperExtensions.Analyzers | null | false | NotApplicable | netstandard2.0 |
11. Upstream Dependencies & Downstream Dependents#
Upstream Dependencies (3)
Downstream Dependents (0)
No other EricksonLopez.* libraries currently depend on this family.
12. Optional Adapters & Third-Party Integrations#
Internal Adapter Edges & Integration Packages
- EricksonLopez.DapperExtensions→ EricksonLopez.Pagination.Abstractions (EricksonLopez.Pagination)
- EricksonLopez.DapperExtensions→ EricksonLopez.Resilience.Abstractions (EricksonLopez.Resilience)
- EricksonLopez.DapperExtensions→ EricksonLopez.Resilience.Polly (EricksonLopez.Resilience)
- EricksonLopez.DapperExtensions→ EricksonLopez.SqlBuilder.Abstractions (EricksonLopez.SqlBuilder)
Verified External NuGet Dependencies (11)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
DapperExtensionsServiceCollectionExtensions.AddDapperExtensionsAdds Dapper extensions services to the specified service collection.
DapperExtensionsServiceCollectionExtensions.AddDapperResiliencePipelinesRegisters shared singleton `Resilience.IResiliencePipeline` instances in the service collection so retry and circuit breaker state is shared across requests.
DapperExtensionsServiceCollectionExtensions.AddDapperTransientErrorDetectorsRegisters provider-specific transient error detector singletons into the service collection both by concrete type and via the `ISqlTransientErrorDetector` abstraction.
DapperExtensionsServiceCollectionExtensions.AddDapperTypeHandlersRegisters standard Dapper type handlers (`DateOnly` and `TimeOnly`) into Dapper's runtime mapping registry.
DapperHealthChecksBuilderExtensions.AddDapperHealthCheckAdds a Dapper database connectivity health check that resolves `IDbConnection` from a scoped service provider.
DapperHealthChecksBuilderExtensions.AddMySqlDapperHealthCheckAdds a MySQL or MariaDB database connectivity health check configured with default MySQL settings.
DapperHealthChecksBuilderExtensions.AddOracleDapperHealthCheckAdds an Oracle Database connectivity health check configured with default Oracle settings.
DapperHealthChecksBuilderExtensions.AddPostgreSqlDapperHealthCheckAdds a PostgreSQL database connectivity health check configured with default PostgreSQL settings.
DapperHealthChecksBuilderExtensions.AddSqlServerDapperHealthCheckAdds a Microsoft SQL Server database connectivity health check configured with default SQL Server settings.
DapperHealthChecksBuilderExtensions.AddSqliteDapperHealthCheckAdds a SQLite database connectivity health check configured with default SQLite settings.
DapperOpenTelemetryServiceCollectionExtensions.AddDapperOpenTelemetryAdds Dapper OpenTelemetry configuration options to the specified service collection.
Key Public Types & Contracts
EricksonLopez.DapperExtensions.SqlEntityAttribute (class)Specifies that a partial class is a SQL entity for which the Roslyn incremental source generator emits compile-time, zero-reflection Native AOT hydration methods (`ReadFromDataReader`, `GetMultiMapReaderFactory`, and `MultiMap.IDataReaderMapper<T>`).
EricksonLopez.DapperExtensions.Analyzers.NoDynamicDapperAnalyzer (class)Roslyn diagnostic analyzer (`EL_DAP001`) banning `dynamic` Dapper materialization (such as `QueryAsync<dynamic>`, `Query<dynamic>`, `QuerySingleAsync<dynamic>`, and untyped non-generic `SqlMapper.Query` / `SqlMapper.QueryAsync` overloads) to preserve compile-time type safety, zero-boxing performance, and Native AOT compatibility.
EricksonLopez.DapperExtensions.DependencyInjection.DapperExtensionsOptions (class)Represents configuration options for Dapper extensions services and type handler registrations.
EricksonLopez.DapperExtensions.DependencyInjection.DapperExtensionsServiceCollectionExtensions (class)Provides extension methods for configuring Dapper extensions services on an `IServiceCollection`.
EricksonLopez.DapperExtensions.HealthChecks.DapperHealthCheck (class)Provides a database health check that validates connectivity by executing a lightweight query via Dapper.
EricksonLopez.DapperExtensions.HealthChecks.DapperHealthCheckOptions (class)Represents configuration options for database connectivity health checks.
EricksonLopez.DapperExtensions.HealthChecks.DapperHealthChecksBuilderExtensions (class)Provides extension methods for registering Dapper database connectivity health checks on `IHealthChecksBuilder`.
EricksonLopez.DapperExtensions.MariaDb.Bulk.BulkBuilder (class)Provides factory methods for creating `BulkBuilder<T>` instances.
EricksonLopez.DapperExtensions.MariaDb.Bulk.BulkBuilder`1 (class)Builds parameterized multi-row INSERT SQL statements and Dapper parameters for bulk operations on MariaDB.
EricksonLopez.DapperExtensions.MariaDb.Bulk.BulkExtensions (class)Provides extension methods for bulk INSERT, UPSERT, UPDATE, and DELETE operations on MariaDB connections.
EricksonLopez.DapperExtensions.MariaDb.Pagination.PagedQueryExtensions (class)Provides extension methods for executing paginated queries with Dapper on MariaDB databases.
EricksonLopez.DapperExtensions.MariaDb.Transactions.TransactionExtensions (class)Provides extension methods for executing operations within a MariaDB transaction scope.
14. Verified Performance Benchmarks#
All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
Benchmark artifacts exist in `dotnet-dapper-extensions/benchmarks/` (1 suite), but all 1 recorded row(s) reported `na_error` (`Mean = NA`, `Allocated = NA`) rather than numeric measurements.
| Suite | Method | Runtime | Mean (ns) | Allocated (B) | Status |
|---|---|---|---|---|---|
| BulkInsertBenchmarks | Row-by-row INSERT | .NET 10.0.12 X64 RyuJIT x86-64-v4 | NA | NA | na_error |
15. Release History & NuGet vs Repo Status#
Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.1.0.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v2.0.0 ↗ | nuget | 2026-09-26 | Published EricksonLopez.DapperExtensions 2.0.0 to NuGet.org. |
| v2.0.0 ↗ | github | 2026-09-25 | [2.0.0](https://github.com/ericksonlopezf/dotnet-dapper-extensions/compare/v1.0.0...v2.0.0) (2026-09-25) ⚠ BREAKING CHANGES * introduce async streaming, source generators, observability, and hardened savepoint lifecycle ✨ Features * introduce async streaming, source generators, observability, and hardened savepoint lifecycle ([a435fba](https://github.com/ericksonlopezf/dotnet-dapper-extensions/... |
16. Complementary & Related Libraries#
Libraries in the same tier, architectural layer, or directly paired via dependency edges.
17. Documentation, API Reference & Portal Links#
Conceptual Documentation (Starlight) →
Extracted XML API Reference →
36 namespaces · 75 types · 271 members
Ecosystem Dependency Map →
Learning Center & Handbook →
Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.
18. Source Repository, License & Contributing#
Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).
19. Troubleshooting, Pitfalls & Migration Guidance#
- This library supersedes the deprecated dapper-extensions-pg repository. Note its single verified benchmark entry is na_error (no numeric meanNs yet).
- Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.1.0.
20. Quality & Verification Evidence#
- Strong-Name Signing (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- XML Documentation Extraction
- Verified (36 namespaces, 75 types, 271 members)
- MSBuild AOT / Trim Attributes
- 10 Full / 0 Partial / 0 Incompatible / 2 N/A
- BenchmarkDotNet Artifacts
- 1 total (0 measured, 1 na_error)
Explicit Verification Boundaries & Limitations
- All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
- 1 unpublished