Question

I created a new ASP .NET MVC 5 project as well as I created ASP .NET Identity tables.

But somehow some AspNet tables appeared and when I register new user it keeps all user data under the old tables.

Is that correct? Should not it save under new tables like Users?

What do I am missing?

enter image description here

P.S. That MS link does not help understand that behavior http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity

Was it helpful?

Solution 2

Thanks to Google I found answer I need here

http://www.itorian.com/2013/11/customize-users-profile-in-aspnet.html

It seems like I am facing two sets of tables because of the Simple Membership and ASP.NET Identity System are presented at the same time.

OTHER TIPS

Those tables created are done by the IdentityDbContext. In the OnModelCreating method of the IdentityDbContext the tables are assigned the names you have highlighted in your screenshot like so.

modelBuilder.Entity<IdentityUser>().ToTable("AspNetUsers");

If you would like to rename them, you would have to override the OnModelCreating method in your own implementation and name them as you would like.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top