Visual Studio MVC 4 Web 应用程序、SQL Server 2008 R2、实体框架 5
我启用了自动迁移(在 configuration.cs 中):
public Configuration()
{
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = false;
}
作为预防措施,DataLossAllowed 被禁用。在本地和服务器上手动运行此迁移的最佳方式是什么?
我收到此错误:
The "WebSecurity.InitializeDatabaseConnection" method can be called only once.
当我尝试从包管理器运行它时。
似乎手动运行迁移,并使它们自动化是不兼容的?!