title: How to include a subquery inside .where in c#?
body: <p>My simple SQL query is </p>
  
  <pre><code>select * 
  from deletedCards 
  where cardNumber in (select cardNum from cardInformation 
                       where country = 'NP')
  </code></pre>
  
  <p>and I need to write it in C#. I've come this far : </p>
  
  <pre><code>var Query1 = dbContext.deletedCards;
  Query1.Where(x =&gt; dbContext.cardInformation.Where(a =&gt; a.country== 'NP')).Select(a =&gt; a.cardNum).Contains(x =&gt; x.cardNumber);
  </code></pre>
  
  <p>but this is showing an error </p>
  
  <blockquote>
    <p>Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type</p>
  </blockquote>
  
  <p>Can anybody help me write the query correctly? Thanks!</p>