infrastructure restructure
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AipsCore.Infrastructure.Persistence.Db;
|
||||
|
||||
public class AipsDbContext : DbContext
|
||||
{
|
||||
public DbSet<User.User> Users { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using AipsCore.Domain.Abstract;
|
||||
|
||||
namespace AipsCore.Infrastructure.Persistence.Db;
|
||||
|
||||
public class EfUnitOfWork : IUnitOfWork
|
||||
{
|
||||
private readonly AipsDbContext _dbContext;
|
||||
|
||||
public EfUnitOfWork(AipsDbContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
public async Task SaveChangesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _dbContext.SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user