25 lines
662 B
C#
25 lines
662 B
C#
using LCU.API.Internal.MemberPreferencesApiLib.Persistence;
|
|
using LCU.Library.Internal.MemberPreferencesApiModels.Enums;
|
|
|
|
namespace LCU.API.Internal.MemberPreferencesApiLib.Repositories;
|
|
|
|
public class UnitOfWork : IUnitOfWork
|
|
{
|
|
private readonly ApplicationDbContext _context;
|
|
|
|
public UnitOfWork(ApplicationDbContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public async Task CompleteAsync()
|
|
{
|
|
await _context.SaveChangesAsync();
|
|
}
|
|
|
|
public async Task CompleteAsync(string operatorId, DateTime dateAdded, UserType userType)
|
|
{
|
|
await _context.SaveChangesWithOperatorAsync(operatorId, dateAdded, userType);
|
|
}
|
|
}
|