feat: rebuild base repository hierarchy, add readme and agents
- 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>
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
namespace HrynCo.DAL.EF.Core;
|
||||
|
||||
using HrynCo.DAL.Abstract;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
|
||||
namespace HrynCo.DAL.EF.Core;
|
||||
|
||||
internal sealed class EfTransactionAdapter : ITransaction
|
||||
public class EfTransactionAdapter : ITransaction
|
||||
{
|
||||
private readonly IDbContextTransaction _transaction;
|
||||
private readonly IDbContextTransaction _efTransaction;
|
||||
|
||||
internal EfTransactionAdapter(IDbContextTransaction transaction)
|
||||
public EfTransactionAdapter(IDbContextTransaction efTransaction)
|
||||
{
|
||||
_transaction = transaction;
|
||||
_efTransaction = efTransaction;
|
||||
}
|
||||
|
||||
public Task CommitAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
return _transaction.CommitAsync(cancellationToken);
|
||||
return _efTransaction.CommitAsync(cancellationToken);
|
||||
}
|
||||
|
||||
public Task RollbackAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
return _transaction.RollbackAsync(cancellationToken);
|
||||
return _efTransaction.RollbackAsync(cancellationToken);
|
||||
}
|
||||
|
||||
public ValueTask DisposeAsync()
|
||||
{
|
||||
return _transaction.DisposeAsync();
|
||||
return _efTransaction.DisposeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user