I have this MySQL query which does what I want. But I don't know how to translate this query to linq, the part of the UNION is what confuses me.
The MYSQL query:
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 ;