I\'m kind of stuck with that problem. Hope i\'ll get some help. Here\'s the point. I have to fill my DataGridView with that SQL request :
SELECT LOT.NumLot,
The problem is that your anonymous types are not the same type.
One is { ? NumLot, ? EtatLot, string NomEmploye }
and the other is { ? NumLot, ? EtatLot, string test }
. The last member has a different name hence it is a different type.
Try this instead:
var listeLotControle =
(
from x in entBoum.LOT
join aff in entBoum.AFFECTATION_LOT on x.NumLot equals aff.NumLot
join emp in entBoum.EMPLOYE on aff.IdEmploye equals emp.IdEmploye
where x.EtatLot.Contains("Libéré") || x.EtatLot.Contains("Suspendu") || x.EtatLot.Contains("Démarré")
select new { x.NumLot, x.EtatLot, emp.NomEmploye }
).Union
(
from x in entBoum.LOT
where x.EtatLot.Contains("Démarré")
select new { x.NumLot, x.EtatLot, NomEmploye = test }
);