TheSM
TheSM

Reputation: 59

Entity Framework Query many levels with multiple results

select * from auto
where ( id in (
        select id from devis
        where ( devis.auto in (
               SELECT [id]     
               FROM statut
               where( par is null )
               ))
      ))

I have the following SQL query, I want to shape it using EF6 but I can't get it right, any help plz :)

Upvotes: 0

Views: 50

Answers (1)

jlew
jlew

Reputation: 10601

Looks like you are trying to achieve a double join, which could be expressed like this in LINQ:

from a in auto
join d in devis on a.id equals d.id
join s in statut on d.id equals s.id 
where s.par == null
select a

Upvotes: 1

Related Questions