Linq_根据条件判断是否启用where条件

阅读 95

2023-03-05


var result =  from pd in _context.PickDetails.Include(pd => pd.DeliveryOrderDetail)
join p in _context.Pallets on pd.Pallet_ID equals p.Pallet_ID
where pd.DeliveryOrder_ID == deliveryOrderId
&& p.IsLoadConfirmed == false
&& (fromSetPallet || p.Status == "REQUEST")
&& pd.IsCombined == false
group pd by new {p.Pallet_ID, p.SAP_Pallet_ID, p.LocationCode} into palletGroup
select palletGroup;


and (xx  ||  xxx =  xxx)


求人不如求己啊,问了好半天。哎。

精彩评论(0)

0 0 举报