Troubleshooting — EricksonLopez.Transaction
Common compiler and runtime pitfalls when using EricksonLopez.Transaction (2.0.0).
Connection Manipulation Inside ITransactionContext (ELT001)
Section titled “Connection Manipulation Inside ITransactionContext (ELT001)”- Pitfall: Calling
ctx.Connection.Close(),.Dispose(), or.BeginTransaction()manually inside a managedITransactionContextcorrupts transaction/savepoint state (flagged as errorELT001by localConnectionManipulationAnalyzer). - Fix: Execute all SQL through
ctx.ExecuteAsync(...),ctx.QueryAsync<T>(...), orctx.AsCommand(...)and letITransactionManagerown connection disposal and commit/rollback.
Missing AddPostgreSqlTransaction & Unpublished Package Errors
Section titled “Missing AddPostgreSqlTransaction & Unpublished Package Errors”AddPostgreSqlTransactionnot found: Importusing Microsoft.Extensions.DependencyInjection;(ImplicitUsings=disable), as dialect DI extensions reside inMicrosoft.Extensions.DependencyInjection.NU1101onTransaction.Mediator/.EntityFrameworkCore/.Resilience/.Analyzers: These four satellites exist only in local3.1.0HEAD (EntityFrameworkCoreandResiliencetargetnet10.0only) and are not published on NuGet.