29 lines
620 B
C#
29 lines
620 B
C#
using LCU.Library.Internal.ArchiverApiLib.Persistence;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LCU.Library.Internal.ArchiverApiLib.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();
|
|
}
|
|
}
|
|
}
|