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

前端 未结 6 1902
南笙
南笙 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:52

    for that first we have to remove migration that we newly migrated dotnet ef migrations remove -s ..\InvoiceManagement\

    then delete *.Designer.cs file in the migration folder

    finally dotnet ef database update -s ..\InvoiceManagement\ -s mean that startup project(webApi) remember that this code shoud be use in DBcontext file contain folder path. this code use in vscode for webapi.

提交回复
热议问题