0

Я после этого tutorialCode First Migration неудачу

А потом сделал

Update-Database -Force -Verbose 

Он показал, что он модернизировал таблицу. Однако ошибка показывается:

The model backing the 'DbConnection' context has changed 
since the database was created. 
Consider using Code First Migrations to update the database 
(http://go.microsoft.com/fwlink/?LinkId=238269). 

Я также попытался

Enable-Migrations -ContextTypeName MvcApplication6.Models.DbConnection 

Однако он говорит:

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

Любые идеи, что я сделал не так?

ответ

0

Я нашел решение here.

Database.SetInitializer<DbConnection>(null);