Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Entity framework 支持';myDBContext';自创建数据库以来,上下文已更改。考虑使用代码第一迁移来更新数据库_Entity Framework_Azure_Azure Sql Database - Fatal编程技术网

Entity framework 支持';myDBContext';自创建数据库以来,上下文已更改。考虑使用代码第一迁移来更新数据库

Entity framework 支持';myDBContext';自创建数据库以来,上下文已更改。考虑使用代码第一迁移来更新数据库,entity-framework,azure,azure-sql-database,Entity Framework,Azure,Azure Sql Database,我对实体做了一些更改,并在packageManager控制台中成功地执行了“更新数据库-详细”,我可以看到azure数据库中反映的更改 然后我对azure云进行了部署,我从azure云收到了错误消息 "The model backing the 'myDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database"

我对实体做了一些更改,并在packageManager控制台中成功地执行了“更新数据库-详细”,我可以看到azure数据库中反映的更改

然后我对azure云进行了部署,我从azure云收到了错误消息

"The model backing the 'myDBContext' context has changed since the database was created. Consider using Code First Migrations to update the database"
我尝试设置Configuration.AutoDetectChangesEnabled=false并重新部署

但我还是犯了同样的错误


请帮助..

我通过添加

Database.SetInitializer(null)到Global.asax.cs中的应用程序_Start()

可能的重复