Today is a sad day. First thing today I saw EF exception saying that \"The model backing the \'DomainContext\' context has changed since the database was created.\"
I had the same problem today. I added before the problem appeared a ViewModel, a View and Html.EnableClientValidation()
There was no Model changes at all! I did a dummy change, like @Guilleon advised, and created a working Migration... but it didn't help.
Then I restarted the Visual Studio and everything worked again. It must be a glitch
The cause to my problem was a [AllowHtml]
attribute applied to one of the models. The trouble started to happen after I've updated MVC to 5.1.1 and WebApi to 2.1.
I've removed that attribute from EF-Model and stripped and re-build the database and the problem was gone.
I've written up a blog post on how to debug this kind of problems: http://tech.trailmax.info/2014/03/inside_of_ef_migrations/
Also I think this [AllowHtml]
attribute is a bug, I'll create a reproducible solution and will submit the bug report to EF-people.
Update: I actually could never reproduce the error. [AllowHtml]
attribute on class properties had nothing to do with it. A magical glitch that was.