【发布时间】:2012-07-30 19:43:26
【问题描述】:
我有两张表,地址和人员。人们有 FK 要寻址。我正在尝试寻找没有人的地址:
select id from Address a
left outer join person p on p.address_id = a.id
where p.address_id is null
这可能使用 LINQ to Entities 吗?我尝试了一些变化
var results = from addr in _context.Addresses
from ppl in addr.People
where ppl == null ...
但似乎无法弄清楚如何返回没有人的地址。
【问题讨论】:
标签: entity-framework-4.1 outer-join