【发布时间】:2009-05-20 13:11:15
【问题描述】:
我有一个简单的表结构
Images(image_id, image_library_id,...)
Links(link_id, image_id, link_component_code...)
我正在尝试使用 LINQ 执行一个简单的查询
var q = from i in Images where i.Link.link_component_code = "x" select i;
但是 LINQPad 中的智能感知不提供“链接”对象
where i.Link.link_component_code
相反,我只得到一个“Links”对象,它是一个 EntitySet,并没有继续列出表字段,只列出 Add、Select、Where 等方法
如果我反其道而行之
var q = from l in Links where l.Image.image_library_id = 1234 select l;
按预期工作
这个 EntitySet 是什么,我哪里出错了?
【问题讨论】:
标签: c# linq-to-sql linqpad