문제

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