уникальность для полей безопасности
This commit is contained in:
parent
f8bbebe473
commit
edd0dc9fdb
@ -26,6 +26,10 @@ namespace DatabaseCore
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<EnviromentSetting>().HasIndex(s => s.Key).IsUnique();
|
||||
|
||||
modelBuilder.Entity<Role>().HasIndex(s => s.RoleName).IsUnique();
|
||||
|
||||
modelBuilder.Entity<User>().HasIndex(s => s.UserName).IsUnique();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user