feat(core): Core-Bibliotheken auf 2.0.0.0 aktualisiert und IUnique implementiert
- `IUnique`-Schnittstelle in allen Entitäten implementiert. - Interface für DbContext erstellt und DbSet-Eigenschaften in den Konstruktoren über Repositories injiziert.
This commit is contained in:
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class GroupOfUserRepository<TDbContext> : CRUDRepository<GroupOfUser, int, TDbContext>, IGroupOfUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public GroupOfUserRepository(TDbContext dbContext) : base(dbContext)
|
||||
public GroupOfUserRepository(TDbContext dbContext) : base(dbContext, dbContext.GroupOfUsers)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class GroupRepository<TDbContext> : CRUDRepository<Group, int, TDbContext>, IGroupRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public GroupRepository(TDbContext dbContext) : base(dbContext)
|
||||
public GroupRepository(TDbContext dbContext) : base(dbContext, dbContext.Groups)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class ModuleOfUserRepository<TDbContext> : CRUDRepository<ModuleOfUser, int, TDbContext>, IModuleOfUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public ModuleOfUserRepository(TDbContext dbContext) : base(dbContext)
|
||||
public ModuleOfUserRepository(TDbContext dbContext) : base(dbContext, dbContext.ModuleOfUsers)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class ModuleRepository<TDbContext> : CRUDRepository<Module, int, TDbContext>, IModuleRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public ModuleRepository(TDbContext dbContext) : base(dbContext)
|
||||
public ModuleRepository(TDbContext dbContext) : base(dbContext, dbContext.Modules)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserRepRepository<TDbContext> : CRUDRepository<UserRep, int, TDbContext>, IUserRepRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public UserRepRepository(TDbContext dbContext) : base(dbContext)
|
||||
public UserRepRepository(TDbContext dbContext) : base(dbContext, dbContext.UserReps)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserRepository<TDbContext> : CRUDRepository<User, int, TDbContext>, IUserRepository
|
||||
where TDbContext : DbContext
|
||||
where TDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
private IModuleOfUserRepository _moduleOfUserRepo;
|
||||
private IGroupOfUserRepository _groupOfUserRepo;
|
||||
public UserRepository(TDbContext dbContext, IModuleOfUserRepository moduleOfUserRepo, IGroupOfUserRepository groupOfUserRepo) : base(dbContext)
|
||||
public UserRepository(TDbContext dbContext, IModuleOfUserRepository moduleOfUserRepo, IGroupOfUserRepository groupOfUserRepo) : base(dbContext, dbContext.Users)
|
||||
{
|
||||
_moduleOfUserRepo = moduleOfUserRepo;
|
||||
_groupOfUserRepo = groupOfUserRepo;
|
||||
|
||||
Reference in New Issue
Block a user