0
如何將此查詢更改爲外連接,以便沒有訂單的客戶仍然出現在結果中?Linq outer加入
Customers
.Join(
Orders,
c => c.ID,
r => r.ID,
(c, r) =>
new
{
Name = c.Name,
Address = c.Address,
OrderNumber = r.OrderNumber,
OrderDetails = r.OrderDetails
}
).ToList()
你有沒有嘗試過的樣品在http://code.msdn.microsoft.com/LINQ-Join-Operators-dabef4e9? – 2012-08-17 11:29:45