Files
monorepo/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherLib/Repositories/UnitOfWork.cs
T
2026-03-24 15:26:03 -05:00

23 lines
475 B
C#

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();
}
}