public static void Exist() { var context = ApplicationIdentityContext.Create(); IndexChecks.EnsureUniqueIndexOnUserName(context.Users); IndexChecks.EnsureUniqueIndexOnRoleName(context.Roles); }
public static void Exist() { var context = ApplicationIdentityContext.Create(); IndexChecks.EnsureUniqueIndexOnUserName(context.Users); IndexChecks.EnsureUniqueIndexOnRoleName(context.Roles); context.Books.Indexes.CreateOne(Builders <Book> .IndexKeys.Ascending("BookName")); }