From d9126dde2b52a48ad3a23c15b34aa3fcdfc97c15 Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Sat, 3 Apr 2021 10:57:40 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=20=D0=B4=D0=BE=D0=B3=D0=BE=D0=BD=D0=BA?= =?UTF-8?q?=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs index d00f482..15ef624 100644 --- a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs +++ b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs @@ -30,6 +30,8 @@ namespace DatabaseCore modelBuilder.Entity().HasIndex(s => s.RoleName).IsUnique(); + modelBuilder.Entity().HasIndex(s => s.UserName; + modelBuilder.Entity().HasIndex(s => s.EmployeePostName).IsUnique(); modelBuilder.Entity().HasIndex(p => new { p.FirstName, p.LastName, p.Patronymic }).IsUnique();