model backing the context has changed since the database was created. Consider using Code First Migrations to update the database

asp.net-mvc-5 entity-framework-6

Question

I am using MVC5 and EF6 CodeFirst migrations. My model is in a separate project from my MVC web app and I keep getting this error when trying to access the model classes. I have automatic migrations already enabled. I can drop the entire database and then using update-database to regenerate everything I still get this error. The error is wrong because the context has not changed since I created the database. Also, through a Unit Test project, using the same calling code as I have in my MVC app, I can reference the same Model project, access the model classes and data. I have the Model separate from the MVC project because I need to be able to reuse the Model outside of the web.

The model backing the "xx" context has changed since the database was created. Consider using Code First Migrations to update the database

1
6
2/23/2014 8:14:30 PM

Popular Answer

7
2/11/2015 2:29:41 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow