Syntactic variations aside, you can write this in much the same way.
from p in ctx.Product where (from ptp in ctx.ProductTypeParty where ptp.PartyId == 34 select ptp.Id).Contains(p.ProductTypePartyID) select p
I prefer to use the existential quantifier, though:
from p in ctx.Product where (from ptp in ctx.ProductTypeParty where ptp.PartyId == 34 && ptp.Id == p.ProductTypePartyID).Any() select p
I expect this form to be allowed for EXISTS (SELECT * ...) in the generated SQL.
You will need to profile both options if there is a big difference in performance.
source share