c2a4f3b9d7
- TemplateEntity, ProviderEntity, ProviderUsageEntity now inherit Entity (from DAL.Abstract) - Removes duplicated Id, Created, Updated properties from each entity Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
29 lines
773 B
C#
29 lines
773 B
C#
using HrynCo.NotificationService.DAL.Abstract;
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
namespace HrynCo.NotificationService.DAL.EF.Core;
|
|
|
|
internal sealed class EfTransactionAdapter : ITransaction
|
|
{
|
|
private readonly IDbContextTransaction _transaction;
|
|
|
|
internal EfTransactionAdapter(IDbContextTransaction transaction)
|
|
{
|
|
_transaction = transaction;
|
|
}
|
|
|
|
public Task CommitAsync(CancellationToken cancellationToken = default)
|
|
{
|
|
return _transaction.CommitAsync(cancellationToken);
|
|
}
|
|
|
|
public Task RollbackAsync(CancellationToken cancellationToken = default)
|
|
{
|
|
return _transaction.RollbackAsync(cancellationToken);
|
|
}
|
|
|
|
public ValueTask DisposeAsync()
|
|
{
|
|
return _transaction.DisposeAsync();
|
|
}
|
|
} |