Entity Framework model change error

Amita Rai picture Amita Rai · Jun 9, 2013 · Viewed 10.6k times · Source

I am getting the error

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

I am using Entity Framework and have changed my model after declaring DataContext. How can I fix this error?

Answer

giathienphu picture giathienphu · Aug 16, 2014

If you delete the __MigrationHistory table in SQL Server it should fix it.