Skip to content

Search EricksonLopez.* Ecosystem

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

Core Concepts — UnitOfWork, Savepoints, MultiMap & SqlEntity

EricksonLopez.DapperExtensions models database transactions, nested savepoints, resilience retries, and AOT-safe multi-mapping as explicit contracts.

  • BeginUnitOfWorkAsync(IsolationLevel, CancellationToken): Opens the connection if closed (closing it on dispose only when ownsConnection is true) and begins an ADO.NET DbTransaction.
  • WithUnitOfWorkAsync(...): Executes an asynchronous delegate, commits automatically if no exception escapes, and rolls back on failure.
  • CreateSavepointAsync(string name): Requires an underlying System.Data.Common.DbTransaction (throwing NotSupportedException on raw IDbTransaction mocks without DbTransaction per BC-001) and returns an ISavepoint supporting RollbackAsync and ReleaseAsync.

EricksonLopez.DapperExtensions.Resilience provides pre-configured pipelines built on EricksonLopez.Resilience and Polly:

  • SqlResilienceDefaults.ForPostgreSqlPipeline() / ForPostgreSqlWithCircuitBreakerPipeline()
  • SqlResilienceDefaults.ForSqlServerPipeline() / ForSqlServerWithCircuitBreakerPipeline()
  • SqlResilienceExtensions.ExecuteWithResilienceAsync and QueryWithResilienceAsync<T>
  • SavepointResilienceExtensions.ExecuteInSavepointWithRetryAsync for retriable nested operations inside an open IUnitOfWork.
  • Annotate partial classes with [SqlEntity(TableName = "orders")] and reference EricksonLopez.DapperExtensions.SourceGenerators to generate ReadFromDataReader and GetMultiMapReaderFactory at compile time.
  • Use MultiMapBuilder<TReturn>.Query(ISqlQuery).Map<T>(splitOn, combiner).QueryGroupedAsync<TKey>(...) to hydrate parent-child aggregates without reflection.
  • AOT Caveat (ADR-019): DapperStreamingExtensions.StreamAsync<T> uses Dapper’s reflection-based GetRowParser<T> and is not suitable for reflection-free Native AOT paths; prefer [SqlEntity] generated mappers for AOT hosts.