查询模式实现缺失:解决“无法找到”错误
解决问题来验证该类型的质量是至关重要的。在此特定实例中,tblpersoon可能需要以下修改:
var query =(来自tblpersoon.cast.cast.castPossible Causes
Apart from the absence of appropriate implementation, there are certain other potential causes for this error:var query = (from p in tblPersoon.CastMissing LINQ Namespace Usage:() select p).Single();
Make certain that the System.Linq namespace is properly incorporated using the following声明:
使用System.linq;indroper查询目标:
验证您正在查询正确的类型(考虑:在提供的示例中,通过ID的“ tblperson”对象的检索需要dataclasses1datacontext类的实例,该类别揭示了tblpersoons属性。因此,修订的代码类似于以下内容:
public tblpersoon getPersonById(字符串ID) { var context = new dataclasses1datacontext(); var query = context.tblpersoons.where(p => p.id == id).single(); // ... }免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3