Skip to content

Search EricksonLopez.* Ecosystem

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

EricksonLopez.Transaction Overview

EricksonLopez.Transaction (2.0.0 on NuGet, L2) provides explicit transaction boundaries (ITransactionManager, ITransaction, ITransactionContext), nested savepoint orchestration (NestedTransactionBehavior), Dapper command binding, and EricksonLopez.Result-driven commit/rollback semantics without exceptions for business rejections.

  • Commit on IsSuccess, rollback on IsFailure: TransactionResultExtensions.ExecuteResultAsync commits when the operation returns Result.Success and rolls back automatically on Result.Failure without throwing.
  • Composable nesting & savepoints: NestedTransactionBehavior (UseSavepoint default; JoinExisting, RequireNew, Suppress) coordinates inner scopes across PostgreSQL, SQL Server, MySQL, MariaDB, Oracle, and SQLite.
  • Explicit publication boundary: 11 of 15 packages are published on NuGet (2.0.0, 3,824 downloads); 4 packages (Analyzers, EntityFrameworkCore [net10.0 only], Mediator, and Resilience [net10.0 only]) are unpublished local workspace packages (3.1.0).
flowchart LR
App["Caller"] --> Mgr["ITransactionManager.ExecuteResultAsync"]
Mgr --> Opt["TransactionOptions (Isolation / NestedBehavior / Timeout)"]
Opt --> Ctx["ITransactionContext -> ctx.ExecuteAsync / QueryAsync"]
Ctx -- Result.IsSuccess --> Commit["CommitAsync()"]
Ctx -- Result.IsFailure --> Rollback["RollbackAsync()"]
Result-Driven Transaction LifecycleITransactionManager.ExecuteResultAsync opens or joins a transaction with TransactionOptions, passes ITransactionContext to Dapper helpers, and commits on IsSuccess or rolls back on IsFailure.
View accessible text summary and structure

ITransactionManager.ExecuteResultAsync opens or joins a transaction with TransactionOptions, passes ITransactionContext to Dapper helpers, and commits on IsSuccess or rolls back on IsFailure.

flowchart LR
App["Caller"] --> Mgr["ITransactionManager.ExecuteResultAsync"]
Mgr --> Opt["TransactionOptions (Isolation / NestedBehavior / Timeout)"]
Opt --> Ctx["ITransactionContext -> ctx.ExecuteAsync / QueryAsync"]
Ctx -- Result.IsSuccess --> Commit["CommitAsync()"]
Ctx -- Result.IsFailure --> Rollback["RollbackAsync()"]

Overall AOT status is Full (14 Full, 1 NotApplicable analyzer):

Package NuGet (2.0.0) Local HEAD AOT Status TFMs Role
EricksonLopez.Transaction Published (547 dl) 3.1.0 Full net8.0;net9.0;net10.0 TransactionManager, AutonomousTransactionRunner, DeferredTransactionUnitOfWork
EricksonLopez.Transaction.Abstractions Published (657 dl) 3.1.0 Full net8.0;net9.0;net10.0 ITransactionManager, ITransaction, ITransactionContext, TransactionOptions
EricksonLopez.Transaction.PostgreSql Published (351 dl) 3.1.0 Full net8.0;net9.0;net10.0 AddPostgreSqlTransaction, PostgreSqlConnectionFactory, PostgreSqlErrorClassifier
EricksonLopez.Transaction.Result Published (338 dl) 3.1.0 Full net8.0;net9.0;net10.0 TransactionResultExtensions.ExecuteResultAsync
EricksonLopez.Transaction.Dapper Published (258 dl) 3.1.0 Full net8.0;net9.0;net10.0 AsCommand, ExecuteAsync, QueryAsync<T>, QuerySingleOrDefaultAsync<T>
EricksonLopez.Transaction.MariaDb / .Oracle / .SqlServer / .Sqlite / .MySql Published (288..268 dl) 3.1.0 Full net8.0;net9.0;net10.0 Dialect connection factories and Add*Transaction DI extensions
EricksonLopez.Transaction.Testing Published (267 dl) 3.1.0 Full net8.0;net9.0;net10.0 FakeTransactionManager, FakeTransaction, FakeTransactionContext, FakeAutonomousTransactionRunner
EricksonLopez.Transaction.Analyzers Unpublished 3.1.0 NotApplicable netstandard2.0 Roslyn ELT001 (ConnectionManipulationAnalyzer) — local only
EricksonLopez.Transaction.EntityFrameworkCore Unpublished 3.1.0 Full net10.0 only DbContextTransactionExtensions.UseTransactionAsync — local only
EricksonLopez.Transaction.Mediator Unpublished 3.1.0 Full net8.0;net9.0;net10.0 TransactionPipelineBehavior<,>, AddTransactionPipelineBehavior() — local only
EricksonLopez.Transaction.Resilience Unpublished 3.1.0 Full net10.0 only PollyTransactionExtensions.HandleAmbiguousCommit — local only

Measured directly from BenchmarkDotNet.Artifacts (3 total rows: 1 measured, 2 na_error) in TransactionBenchmarks on .NET 10.0.12 X64 RyuJIT x86-64-v3 (no NativeAOT reports):

  • DirectDbTransactionBenchmark: 7,451 ns / 1,690 B (measured)
  • na_error disclosure (2 rows): FrameworkNestedSavepointBenchmark and FrameworkTransactionBenchmark recorded Mean = NA in the benchmark artifact and are disclosed rather than estimated.