0

我跟着这个教程

然后做了

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.

任何想法我做错了什么?

4

1 回答 1

0

我在这里找到了解决方案。

Database.SetInitializer<DbConnection>(null);
于 2013-04-28T15:19:47.660 回答