There is already an object named in the database

it seems there is a problem in migration process, run add-migration command in “Package Manager Console”:

Add-Migration Initial -IgnoreChanges

do some changes, and then update database from “Initial” file:

Update-Database -verbose

Edit:
-IgnoreChanges is in EF6 but not in EF Core, here’s a workaround:
https://stackoverflow.com/a/43687656/495455

Leave a Comment