From edd0dc9fdb1470faf6b4cc1c56585e72836697e5 Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Fri, 2 Apr 2021 22:21:34 +0400 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=BD=D0=B8=D0=BA=D0=B0=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=B5=D0=B9=20=D0=B1=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0?= =?UTF-8?q?=D1=81=D0=BD=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs index d3501f5..30bbab1 100644 --- a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs +++ b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs @@ -26,6 +26,10 @@ namespace DatabaseCore protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().HasIndex(s => s.Key).IsUnique(); + + modelBuilder.Entity().HasIndex(s => s.RoleName).IsUnique(); + + modelBuilder.Entity().HasIndex(s => s.UserName).IsUnique(); }