26 lines
555 B
C#
26 lines
555 B
C#
using System.Threading.Tasks;
|
|
using LCU.API.Internal.DocumentIngestorLib.Persistence;
|
|
|
|
namespace LCU.API.Internal.DocumentIngestorLib.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();
|
|
}
|
|
}
|
|
}
|