gpt4 book ai didi

asp.net-mvc - 错误 2002 : The EntityContainer 'X' for the storage model specified as part of this MSL does not exist in MetadataWorkspace

转载 作者:行者123 更新时间:2023-12-02 18:13:21 25 4
gpt4 key购买 nike

我正在尝试将 Oracle 数据库集成到 ASP.NET 应用程序中,但我不断收到此错误:

Error 2002: The EntityContainer 'OracleDBTargetContainer' for the storage model specified as part of this MSL does not exist in MetadataWorkspace.

我已经尝试了所有我能想到的方法,但仍然无法找出问题所在。我该如何诊断其根本原因?

这对我来说仍然是新鲜事,所以我可能会错过一些非常明显的东西。

我假设它不像我的数据库,因为当我集成另一个数据库时显示的图表。我检查了外键、主键……但没有什么好处。

将 VS2013 与 ODP.NET 12c 第 3 版结合使用。

编辑:我的 EntityContainerMapping 是空的,这正常吗?

<EntityContainerMapping CdmEntityContainer="PMModelContainer" StorageEntityContainer="PMModelTargetContainer"></EntityContainerMapping>

最佳答案

我发现出了什么问题。

我的一个外键与主键不匹配(数字 20 而不是数字 10)

我在堆栈溢出上看到这可能是一个问题,并检查了我的表,但我显然错过了那个。

我是怎么意识到的?好吧,因为我没有创建 EF 设计器,而是选择了 Code First from database 选项,哦,你知道吗,错误消息现在准确地告诉你问题是什么! (表名称和列)。

关于asp.net-mvc - 错误 2002 : The EntityContainer 'X' for the storage model specified as part of this MSL does not exist in MetadataWorkspace,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32626511/

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