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)


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