feat(WFDBContext): Implementiert UserManagerDbContext.
This commit is contained in:
parent
70d7ed7415
commit
c7f1be7c58
@ -5,6 +5,7 @@ using WorkFlow.Infrastructure.Contracts;
|
|||||||
|
|
||||||
namespace WorkFlow.Infrastructure.Repositories
|
namespace WorkFlow.Infrastructure.Repositories
|
||||||
{
|
{
|
||||||
|
//TODO: Make the db context type generic so that it can be used by other projects with different db contexts.
|
||||||
public class ConfigRepository(WFDBContext dbContext) : CRUDRepository<Config, int, WFDBContext>(dbContext, dbContext.Configs), IConfigRepository, ICRUDRepository<Config, int>
|
public class ConfigRepository(WFDBContext dbContext) : CRUDRepository<Config, int, WFDBContext>(dbContext, dbContext.Configs), IConfigRepository, ICRUDRepository<Config, int>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
|
using DigitalData.UserManager.Infrastructure;
|
||||||
|
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WorkFlow.Domain.Entities;
|
using WorkFlow.Domain.Entities;
|
||||||
|
|
||||||
namespace WorkFlow.Infrastructure
|
namespace WorkFlow.Infrastructure
|
||||||
{
|
{
|
||||||
public class WFDBContext(DbContextOptions options) : DbContext(options)
|
public class WFDBContext(DbContextOptions options) : DbContext(options), IUserManagerDbContext
|
||||||
{
|
{
|
||||||
public DbSet<Config> Configs { get; set; }
|
public DbSet<Config> Configs { get; set; }
|
||||||
|
|
||||||
@ -14,5 +17,25 @@ namespace WorkFlow.Infrastructure
|
|||||||
public DbSet<ProfileObjState> ProfileObjStates { get; set; }
|
public DbSet<ProfileObjState> ProfileObjStates { get; set; }
|
||||||
|
|
||||||
public DbSet<State> States { get; set; }
|
public DbSet<State> States { get; set; }
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
//configure model builder for user manager tables
|
||||||
|
modelBuilder.ConfigureUserManager();
|
||||||
|
|
||||||
|
base.OnModelCreating(modelBuilder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||||
|
<PackageReference Include="UserManager.Infrastructure" Version="2.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user