15c58522ef
- replace EfRepository/BaseDbContext/UtcValueConverter with BaseEfRepository and BaseRepository - add IEfRepository interface hierarchy - consolidate IEntity into Entity.cs, remove standalone IEntity.cs - add PagedResult - adjust all namespaces to HrynCo.DAL.Abstract / HrynCo.DAL.EF - add README.md with solution overview, versioning rules, class diagram - add AGENTS.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
737 B
C#
30 lines
737 B
C#
namespace HrynCo.DAL.EF.Core;
|
|
|
|
using HrynCo.DAL.Abstract;
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
public class EfTransactionAdapter : ITransaction
|
|
{
|
|
private readonly IDbContextTransaction _efTransaction;
|
|
|
|
public EfTransactionAdapter(IDbContextTransaction efTransaction)
|
|
{
|
|
_efTransaction = efTransaction;
|
|
}
|
|
|
|
public Task CommitAsync(CancellationToken cancellationToken = default)
|
|
{
|
|
return _efTransaction.CommitAsync(cancellationToken);
|
|
}
|
|
|
|
public Task RollbackAsync(CancellationToken cancellationToken = default)
|
|
{
|
|
return _efTransaction.RollbackAsync(cancellationToken);
|
|
}
|
|
|
|
public ValueTask DisposeAsync()
|
|
{
|
|
return _efTransaction.DisposeAsync();
|
|
}
|
|
}
|