How can I write below sql query in linq
select * from Product where ProductTypePartyID IN
(
select Id from ProductTypeParty where PartyId = 34
)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Syntactic variations aside, you can write it in practically the same way.
I prefer using the existential quantifier, though:
I expect that this form will resolve to an
EXISTS (SELECT * ...)in the generated SQL.You’ll want to profile both, in case there’s a big difference in performance.