There is already an object named 'AspNetRoles' in the database

前端 未结 6 1900
南笙
南笙 2020-11-30 23:28

Some time ago, I created a ASP.NET MVC 5 website with the Identity 1.0 version, and i created the Identity tables with this project. Now i have to make other website using t

6条回答
  •  情话喂你
    2020-11-30 23:51

    In the "appsettings.json" file change the name of database

    "ConnectionStrings": {
        "DefaultConnection": "Server=DESKTOP-S0S1I;Database=New_name_here;Trusted_Connection=True;"
    

    and then

    add-migration 
    update-database
    

    It works.

提交回复
热议问题