gpt4 book ai didi

c# - Entity Framework : Function Import - Code Generated In Designer But Not Recognized By Compiler

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

按照说明将存储过程导入到我的模型中 here .存储过程和结果类显示在模型浏览器以及 Designer.cs 代码中:

Shown: model browser, and code from the designer.cs class]![enter image description here项目编译,但我无法引用创建的 GetCurrentConfigurationSettings 方法:

VS does not recognize the new method

尝试删除并重新创建函数导入。添加/删除 using 语句。我尝试了各种对象/方法调用排列,但没有任何效果。无计可施。我还能缺少什么?

最佳答案

最后,这个问题的解决方案是删除所有与 EF 相关的文件并重新开始。我唯一能想到的可能是我多次更改了 EF 文件所在的项目的名称。我假设这导致了 EF(或我自己)部分的某种功能和/或 namespace 混淆。自从重新创建模型以来,我已经毫无问题地导入了 2 或 3 个函数。

关于c# - Entity Framework : Function Import - Code Generated In Designer But Not Recognized By Compiler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27492336/

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