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

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

Accepted Answer

It was such a strange error, and in the end, it wasn't my fault; rather, Microsoft's. I installed the Entity framework in "pre-release" mode, and that was what caused the error; when I upgraded to the stable release, it disappeared. Thank you, everyone; believe me when I say that I spent a week or so looking for the answer to this question, so I'm fairly confident that this issue isn't present anywhere else. The version of entity framework.dll that caused the

11
3/15/2014 6:12:25 AM

Popular Answer

Just in case anyone else who was implementing a database initially like me stumbles across this.

I changed it by lengthening theApplicationUser adding a new field to the classAspNetUsers table, and upon initialization saw this problem.

By erasing the record produced in the database, I was able to fix issue.__MigrationHistory table (there was only one record there) Although I had already updated my database manually, I presume EF determined that I needed to do so via the migration tool.



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