gpt4 book ai didi

c# - 为什么 Entity Framework 可以在本地工作但不能在 azure 上工作

转载 作者:太空宇宙 更新时间:2023-11-03 16:19:15 25 4
gpt4 key购买 nike

我有一个 WCF 项目,它可以使用 AZURE SQL CONNECTION 在本地完美运行。但是当我在 Azure 上部署 WCF 项目时,它将开始出现此错误。

在没有部署的情况下测试 WCF enter image description here

测试部署的 WCF enter image description here

这是我最近发布的一篇文章,但尚未成功给出答案,但描述了我的场景的一些细节。我越来越绝望了,我花了一整天的时间试图解决这个问题

Why does throws me a FaultException in WCF Service?

我错过了什么?

最佳答案

Once you are using model-first / database-first (EDMX) you must use Entity connection string with referencing .ssdl, .msl and .csdl metadata files. Also be aware that you must create your database in design time when creating model from EDMX = you must generate SQL script and execute it to create the database.

欲了解更多信息,请查看Answered by Ladislav MrnkaCode First vs. Database First

希望这对您有帮助。

关于c# - 为什么 Entity Framework 可以在本地工作但不能在 azure 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14543514/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com