我有3个表 表A 表B 表C
现在要通过先查询表A某个字段F,然后再关联查出表C的结果
就是
表A->表B->表C
我原先这么写,好像不行
query =
from p in context.Ship_Ports
where p.Ship_Port_line.== search.LineId
from e in context.Charges_End_cool
where e.ePort_ID == p.Ship_Port_id
from c in context.Charges_cool
where c.Charges_Begin_id == e.Charges_Begin_ID
select c;
query=from p in context.Ship_Ports
from e in context.Charges_End_cool
from c in context.Charges_cool
where p.Ship_Port_line.== search.LineId && e.ePort_ID == p.Ship_Port_id && c.Charges_Begin_id == e.Charges_Begin_ID
select c;