111,119
社区成员
发帖
与我相关
我的任务
分享
from a in CustomerAccountLogs
join b in (
from s in SendOrders
join sd in SendOrderLines on s.Id equals sd.SendOrderId
select new
{
SendOrderId = sd.SendOrderId,
ProductName = sd.OrderLine.ProductName,
UnitName = sd.OrderLine.UnitName,
Price = sd.OrderLine.Price,
Amount = sd.OrderLine.Price * sd.OrderLine.Count
}
) on a.SendOrderId equals b.SendOrderId
where a.AccountId == 2
select new
{
a.SendOrderId,
a.OperationNumber,
a.OperationType,
b.ProductName,
b.UnitName,
b.Price,
b.Amount
}


[/quote]
你好 按照你的改了 查不来还是一样[/quote]
想把SendOrderId字段等于空的也查出来显示在结果集里面
-》那个表包含 这个“SendOrderId” 就作为 第一个表,也就是左表。类似,看着改吧,
[/quote]
感谢 根据你的思路 改了一下可以了