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:
@@ -1,11 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DigitalData.UserManager.Infrastructure.Repositories
|
||||
{
|
||||
public class UserManagerDbContext : DbContext
|
||||
public class UserManagerDbContext : DbContext, IUserManagerDbContext
|
||||
{
|
||||
public DbSet<GroupOfUser> GroupOfUsers { get; set; }
|
||||
|
||||
public DbSet<Group> Groups { get; set; }
|
||||
|
||||
public DbSet<ModuleOfUser> ModuleOfUsers { get; set; }
|
||||
|
||||
public DbSet<Module> Modules { get; set; }
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
|
||||
public DbSet<UserRep> UserReps { get; set; }
|
||||
|
||||
public UserManagerDbContext(DbContextOptions<UserManagerDbContext> options) : base(options)
|
||||
{
|
||||
GroupOfUsers = Set<GroupOfUser>();
|
||||
Groups = Set<Group>();
|
||||
ModuleOfUsers = Set<ModuleOfUser>();
|
||||
Modules = Set<Module>();
|
||||
Users = Set<User>();
|
||||
UserReps = Set<UserRep>();
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
||||
Reference in New Issue
Block a user