我的 LINQ 查询出了什么问题?
这是在WP7模拟器上。 我尝试执行下一个 LINQ 查询:
from person p in logOnDB
join logonPerson lp in logOnDB on p.id equals lp.personID
join logonData ld in logOnDB on lp.id equals ld.logonID
where ld.password == passingPassword
select p;
但出现以下错误:
System.MethodAccessException 未被用户代码处理
这是什么问题?我应该怎样做才对呢?
It's on WP7 emulator.
I try to execute next LINQ-query:
from person p in logOnDB
join logonPerson lp in logOnDB on p.id equals lp.personID
join logonData ld in logOnDB on lp.id equals ld.logonID
where ld.password == passingPassword
select p;
But it falls with the following error:
System.MethodAccessException was unhandled by user code
What's wrong with that? How should I make it right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用匿名类型时,通常这是一个问题。
如果没有有关 logOnDB 返回内容的更多信息,很难说这是否是您的问题。另外,您可以发布异常的整个堆栈跟踪吗?
Usually this is a problem when you're using anonymous types.
Without more info on what logOnDB is returning it's hard to say if this is your problem. Also, can you maybe post the entire stack trace of the exception?