EricksonLopez.DapperExtensions

dotnet-dapper-extensions · Data Access & Transactions

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L3 Persistence & IntegrationsStableMaintenance: ActiveAOT: FullMIT LicenseConfidence: HIGH
Infrastructurenet8.0net9.0net10.0

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
Also published in this family:
EricksonLopez.DapperExtensions.PostgreSqlEricksonLopez.DapperExtensions.DependencyInjectionEricksonLopez.DapperExtensions.MariaDbEricksonLopez.DapperExtensions.OracleEricksonLopez.DapperExtensions.HealthChecksEricksonLopez.DapperExtensions.SqlServer

4. Verified Ecosystem Metrics#

v2.0.0
NuGet Published Version
v3.1.0
Repo HEAD Version
2,036
NuGet Downloads
12
Packable Packages
271
Public API Members
1
Benchmark Rows (RyuJIT)

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 IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.DapperExtensionsPrimaryPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full297High-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.PostgreSqlPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full472High-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.DependencyInjectionPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full155Dependency 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.MariaDbPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full151High-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.OraclePublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full149High-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.HealthChecksPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full144Database connectivity health checks for EricksonLopez.DapperExtensions across relational providers.
EricksonLopez.DapperExtensions.SqlServerPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full134High-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.OpenTelemetryPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full133OpenTelemetry tracing, metrics, and activity instrumentation for EricksonLopez.DapperExtensions.
EricksonLopez.DapperExtensions.MySqlPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full130High-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.SqlitePublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full130High-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 / GeneratorPublishedv2.0.0 / v3.1.0netstandard2.0AOT: N/A (Analyzer/Legacy)141Roslyn source generator for zero-reflection Native AOT IDataReaderMapper implementations in EricksonLopez.DapperExtensions.
EricksonLopez.DapperExtensions.AnalyzersAnalyzer / GeneratorUnpublished— / v3.1.0netstandard2.0AOT: N/A (Analyzer/Legacy)0Roslyn 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#

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
EricksonLopez.DapperExtensions Dependency Topology3 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

3 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.

DirectionLibraryTierRelationship Kinds
UpstreamEricksonLopez.PaginationL2Adapter, Compile-Time, NuGet Package
UpstreamEricksonLopez.ResilienceL2Adapter, NuGet Package
UpstreamEricksonLopez.SqlBuilderL3Adapter, 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_builder

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 12 packages: 10 Full, 0 Partial, 0 Incompatible, 2 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.DapperExtensionstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.PostgreSqltruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.DependencyInjectiontruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.MariaDbtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.OracletruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.HealthCheckstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.SqlServertruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.OpenTelemetrytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.MySqltruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.SqlitetruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.DapperExtensions.SourceGeneratorsnullfalseNotApplicablenetstandard2.0
EricksonLopez.DapperExtensions.AnalyzersnullfalseNotApplicablenetstandard2.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

Verified External NuGet Dependencies (11)

DapperMicrosoft.Data.SqlClientMicrosoft.Data.SqliteMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Diagnostics.HealthChecksMicrosoft.Extensions.Diagnostics.HealthChecks.AbstractionsMicrosoft.Extensions.ResilienceMySqlConnectorNpgsqlOpenTelemetry.ApiOracle.ManagedDataAccess.Core

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • DapperExtensionsServiceCollectionExtensions.AddDapperExtensions

    Adds Dapper extensions services to the specified service collection.

  • DapperExtensionsServiceCollectionExtensions.AddDapperResiliencePipelines

    Registers shared singleton `Resilience.IResiliencePipeline` instances in the service collection so retry and circuit breaker state is shared across requests.

  • DapperExtensionsServiceCollectionExtensions.AddDapperTransientErrorDetectors

    Registers provider-specific transient error detector singletons into the service collection both by concrete type and via the `ISqlTransientErrorDetector` abstraction.

  • DapperExtensionsServiceCollectionExtensions.AddDapperTypeHandlers

    Registers standard Dapper type handlers (`DateOnly` and `TimeOnly`) into Dapper's runtime mapping registry.

  • DapperHealthChecksBuilderExtensions.AddDapperHealthCheck

    Adds a Dapper database connectivity health check that resolves `IDbConnection` from a scoped service provider.

  • DapperHealthChecksBuilderExtensions.AddMySqlDapperHealthCheck

    Adds a MySQL or MariaDB database connectivity health check configured with default MySQL settings.

  • DapperHealthChecksBuilderExtensions.AddOracleDapperHealthCheck

    Adds an Oracle Database connectivity health check configured with default Oracle settings.

  • DapperHealthChecksBuilderExtensions.AddPostgreSqlDapperHealthCheck

    Adds a PostgreSQL database connectivity health check configured with default PostgreSQL settings.

  • DapperHealthChecksBuilderExtensions.AddSqlServerDapperHealthCheck

    Adds a Microsoft SQL Server database connectivity health check configured with default SQL Server settings.

  • DapperHealthChecksBuilderExtensions.AddSqliteDapperHealthCheck

    Adds a SQLite database connectivity health check configured with default SQLite settings.

  • DapperOpenTelemetryServiceCollectionExtensions.AddDapperOpenTelemetry

    Adds 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.

SuiteMethodRuntimeMean (ns)Allocated (B)Status
BulkInsertBenchmarksRow-by-row INSERT.NET 10.0.12 X64 RyuJIT x86-64-v4NANAna_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.

VersionSourcePublished DateSummary
v2.0.0 ↗nuget2026-09-26Published EricksonLopez.DapperExtensions 2.0.0 to NuGet.org.
v2.0.0 ↗github2026-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/...

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

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

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.