I have been trying out EF 4.1 (code first) with MVC 3. I am thinking ahead to when the application will need changes. I tested a couple of scenarios. I like the
I know this has been marked as solved but in my case it didn't do the trick.
Once I deleted dbo.EdmMetadata
I was getting a different error:
Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions.
The way it worked for me was to remove the Initializer
class from Application_Start
:
void Application_Start(object sender, EventArgs e)
{
// MyDB.SetInitializer(new MyInitializer());
}