22 lines
463 B
C#
22 lines
463 B
C#
using LCU.API.Internal.LoanRateLoadTestingLib.Persistence;
|
|
namespace LCU.API.Internal.LoanRateLoadTestingLib.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();
|
|
}
|
|
} |