好吧这是一个小小的呻吟,但这也是一个问题.在Linq我可以这样做一个连接:
from c in dc.Customers join o in dc.Orders on c.custid equals o.custid ...
Run Code Online (Sandbox Code Playgroud)
一切都很好,完全可以记住,而不必回去谷歌.但是由于某些原因,左连接更加复杂:
from c in dc.Customers
join o in dc.Orders on c.custid equals o.custid
into temp from x in temp.DefaultIfEmpty() ...
Run Code Online (Sandbox Code Playgroud)
所以我的问题是为什么Linq的设计师不能用这样的东西简单(更像sql):
来自c的dc.Customers在c.custid等于o.custid的dc.Orders中加入了o ...
干杯李