gpt4 book ai didi

.net - 实例化时找不到数据库对象实例化

转载 作者:行者123 更新时间:2023-11-29 13:41:51 24 4
gpt4 key购买 nike

我有一个到数据库(Postgressql)的连接,在服务器资源管理器中我可以看到它并连接到它但是我不能在我的 Controller 中实例化它

 public CentralEntities testDB = new CentralEntities();

名称是 CentralEntities,我收到此错误消息,提示未找到 CentralEntities,您是否缺少引用?奇怪的是它一直工作到昨天

最佳答案

根据david的提示,原来自动生成的类丢失了,通过使用备份将其添加到项目中,问题解决了

关于.net - 实例化时找不到数据库对象实例化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54197668/

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