Adding
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using LCU.Api.Internal.DispatcherLib.Persistence;
|
||||
using System.Threading.Tasks;
|
||||
namespace LCU.Api.Internal.DispatcherLib.Repositories;
|
||||
|
||||
public class UnitOfWork : IUnitOfWork
|
||||
{
|
||||
private readonly AppDbContext _context;
|
||||
|
||||
public UnitOfWork(AppDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task CompleteAsync()
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public void Complete()
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user