unit of work
This commit is contained in:
18
dotnet/AipsCore/Infrastructure/Db/EfUnitOfWork.cs
Normal file
18
dotnet/AipsCore/Infrastructure/Db/EfUnitOfWork.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using AipsCore.Domain.Abstract;
|
||||
|
||||
namespace AipsCore.Infrastructure.Db;
|
||||
|
||||
public class EfUnitOfWork : IUnitOfWork
|
||||
{
|
||||
private readonly AipsDbContext _dbContext;
|
||||
|
||||
public EfUnitOfWork(AipsDbContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
public async Task SaveChangesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _dbContext.SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user