protected override void OnModelCreating(ModelBuilder modelBuilder) { // Call the base OnModelCreating base.OnModelCreating(modelBuilder); // TODO: figure out why application from assembly doesn't work // modelBuilder.ApplyConfigurationsFromAssembly(typeof(UserConfiguration).Assembly); new PermissionConfiguration().Configure(modelBuilder.Entity<Permission>()); new RoleConfiguration().Configure(modelBuilder.Entity<Role>()); new UserConfiguration().Configure(modelBuilder.Entity<User>()); new LogConfiguration().Configure(modelBuilder.Entity<Log>()); }
public class DashboardDbContext : DbContext, IDashboardDbContext
new PermissionConfiguration().Configure(modelBuilder.Entity<Permission>()); new RoleConfiguration().Configure(modelBuilder.Entity<Role>()); new UserConfiguration().Configure(modelBuilder.Entity<User>());
public string? Foo {get;set;}
public string Foo {get;set;} = string.Empty;