0
林與一些LINQLINQ留下了所有來自左表的WHERE子句顯示無論
我想要的一切,從CustomerDiscountGroups表奮力加入,然後再加入另一個表中的列。如果where條件顯示療法沒有CustomerDiscounts我還是希望它顯示所有從CustomerDiscountGroups表colums和狀態0 Discount_PC(十進制)
繼承人我嘗試
from c in CustomerDiscountGroups
join d in CustomerDiscounts on c.ID equals d.Discount_ID into cd
from cdi in (from f in cd
where f.AccountNo == "test"
select f).DefaultIfEmpty()
select new
{
c.ID,
c.DisplayName,
c.Image,
c.Added,
c.Added_by,
c.Edited,
c.Edited_by,
//cdi.Discount_PC
}
如果有多個匹配的「CustomerDiscounts」記錄,會發生什麼情況?或者只能有0或1? – Enigmativity