Change ASP.NET Identity to use existing database

前端 未结 2 1758
攒了一身酷
攒了一身酷 2021-01-06 02:29

I\'m using ASP.NET MVC 5 with a Database-First workflow. I\'ve created the Identity tables (AspNetUsers, AspNetRoles etc.) in my existing database

2条回答
  •  时光取名叫无心
    2021-01-06 02:57

    You can resolved this problem by following these steps:

    • 1-create aspnetuser etc tables on your database (whatever DB you want to use)
    • simply connect the application with that database not using entity framework, i'm saying just simple connection.
    • you will find connection string in web.config file.

    • place this connection string into identity model clsss

    • your Register and Token methods now running
    • now you can use entity framewoek for rest of your tables by data first approach

提交回复
热议问题