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