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

有帮助吗?

解决方案 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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top