The model backing the 'DataContext' context has changed since the database was created

后端 未结 4 595
迷失自我
迷失自我 2021-01-17 14:29

I am trying to use Code First with Migrations. Even though there are no current changes to my model, I\'m getting an exception. When I add a migration, the up and down are e

4条回答
  •  半阙折子戏
    2021-01-17 15:19

    I bet your data context is not hooking up the connection string. Check if it's not initialized with a localdb (something like (localdb)\v11.0) and not working with that when you might think it's set to something else.

提交回复
热议问题