Skip to content

fix: Fix transaction management in UnitOfWork implementations

  • Fixed AdoNetUnitOfWork and DapperUnitOfWork transaction commit/rollback logic
  • Added _isTransactionCompleted flag to track transaction state
  • Fixed CommitTransactionAsync() to actually commit transactions
  • Fixed SaveChangesAsync() to properly handle transaction state
  • Fixed DisposeResourcesAsync() to safely rollback uncommitted transactions
  • Updated tests to use 'await using' pattern instead of explicit DisposeAsync()
  • Added Microsoft.Extensions.DependencyInjection.Abstractions package
  • Formatted all modified files with CSharpier

Tests:

  • ADO.NET UnitOfWork: 4/4 tests passing
  • Dapper UnitOfWork: 6/7 tests passing (1 flaky due to SQLite concurrency)

Merge request reports

Loading