select * from ABC a left outer join (select * from XYZ x)y on a.ID = y.ID
如何将上述查询转换为linq(c#)
您可以使用此。
from a in ABC
join y in (from x in XYZ select x ) on a.ID equals y.ID into temp
from z in temp.DefaultIfEmpty()
select z