Files
sanctions-search/src/SanctionsSearch.Worker/Persistence/EfUnitOfWork.cs
T

17 lines
489 B
C#
Raw Normal View History

2024-08-20 23:42:20 -05:00
namespace SanctionsSearch.Worker.Persistence;
class EfUnitOfWork(AppDbContext context, ILoggerFactory loggerFactory) : IUnitOfWork, IAsyncDisposable
{
private readonly AppDbContext _context = context;
public ISdnRepository Sdns { get; } = new SdnRepository(context, loggerFactory.CreateLogger<SdnRepository>());
public async Task SaveChangesAsync()
{
await _context.SaveChangesAsync();
}
public async ValueTask DisposeAsync()
{
await _context.DisposeAsync();
}
}