I have two tables with a one (Parent) to many (Details) relationship.
I would like to write this query (which is written in SQL) in Linq. As you see; it is an inner join on a subquery, which contains Except:
select pa.* from dbo.Parent pa
inner join
(
select p.ID from dbo.Parent p
except
(
select d.ID from dbo.Details d where (d.ParentID = 371)
)
) p
on pa.ID = p.ID
where pa.ID <> 371