I copied default AspNet Identity tables (AspNetUsers, AspNetLogin etc) into my database and everything worked fine. Then I changed their names and made my own context with the following method:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<IdentityUser>()
.ToTable("tblUsers", "dbo");
modelBuilder.Entity<IdentityRole>()
.ToTable("tblRoles", "dbo");
modelBuilder.Entity<IdentityUserRole>()
.ToTable("tblUserRoles", "dbo");
modelBuilder.Entity<IdentityUserClaim>()
.ToTable("tblUserClaims", "dbo");
modelBuilder.Entity<IdentityUserLogin>()
.ToTable("tblUserLogins", "dbo");
}
But it seems like the application is still looking for tables with old names as I'm getting error:
Please, tip me what are the neccessary changes that I haven't done ?