简体   繁体   中英

How to add ASP.NET MVC5 Identity Authentication to existing database that has User,Role Table

I am learning MVC5 identity authentication I've got an existing database and have DataContext depending on that database, the database has User table which is very similar to aspnetuser , and I have also role which also as aspnetrol.I'm trying to integrate ASP.NET Identity to my project. Should I delete the USer , Role Tables that I had after adding identity to my database?and how i connect aspnetuser to my tables???? this is a picture of my database after I add the Identity enter image description here

I've read How to add ASP.NET MVC5 Identity Authentication to existing database and Integrating ASP.NET Identity to existing database

Asp Identity uses interface based development which makes it possible to implement existing database compatible with Identity. You can inherit IUser, IRoles, IUserManager, etc so that your existing database can be used with asp Identity. I prefer that you look into article first before starting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM