3

I am getting this error when I run my MVC3 application:

The model backing the 'MoviesDB' context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate the database, and optionally seed it with new data.

I am using EF 4.1. Please suggest solution.

forsvarir
  • 10,749
  • 6
  • 46
  • 77
DotnetSparrow
  • 27,428
  • 62
  • 183
  • 316
  • possible duplicate of [Entity Framework Code Only error: the model backing the context has changed since the database was created](http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc) – Gustav Bertram Feb 28 '14 at 09:35

1 Answers1

9

Looks like you added an entry in the either in the Movie model or in the database. Make sure that the schema matches and delete the EdmMetadata table.

user639995
  • 106
  • 3