0

I am using VS 2022 and was having this issue mentioned in the below link (There is already an object named in the database) and the solution mentioned there did not work, so I just went ahead and did an 'Exclude from Project' for the migration that was causing issue and then ran the 'update-database' in my package console. This seemed to have solved the issue, but my question is, is this a temporary fix?

Devs1
  • 1
  • you're probably fine, but this means that Entity Framework is out of sync with the DB. (did you make changes outside of your migrations?) It might be worth checking if you local debug DB has the same structure as your server or publish target... – pcalkins Sep 27 '22 at 20:53
  • After you update database, Can you crud normally? Actually It just caused by ef and Db mismatch. – Xinran Shen Sep 28 '22 at 08:51

0 Answers0