我有这个mysql查询做我想要的。但我不知道如何将此查询转换为linq,UNION的一部分让我感到困惑, MYSQL查询:
SELECT * FROM conta.subrecurso as a
left join conta.recurso as b on a.idRecurso=b.idRecurso
left join conta.eventorecurso as c on b.idRecurso=c.idRecurso
left join conta.recursocliente as d on a.idSubrecurso=d.idSubrecurso
left join conta.eventocliente as e on d.idVenta=e.idVenta
where c.idEvento=47 And e.idVenta =784
UNION
SELECT * FROM conta.subrecurso as a
left join conta.recurso as b on a.idRecurso=b.idRecurso
left join conta.eventorecurso as c on b.idRecurso=c.idRecurso
left join conta.recursocliente as d on a.idSubrecurso=d.idSubrecurso
left join conta.eventocliente as e on d.idVenta=e.idVenta
WHERE c.idEvento=47 and e.idVenta is null ;