Question: how to do subquery in linq?
Answer: If we want to get the equivalent of SQL Self contained subquery, you need to construct an inner query first, and then use the Contains () method in outer query or main query. Example: Following example is multi valued subquery that returns single column but it produce multiple values for the column category id.