Code First Migration failing


I followed this tutorial

And then did

Update-Database -Force -Verbose

It showed that it upgraded the table. However an error is shown:

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

I also tried

Enable-Migrations -ContextTypeName MvcApplication6.Models.DbConnection

However it says:

Migrations have already been enabled in project 'MvcApplication6'. 
To overwrite the existing migrations configuration, use the -Force parameter.

Any ideas what I did wrong?

Accepted Answer

I found the solution here.


Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why