title: Subquery in Where Clause of LINQ statement
body: <p>So I tried to follow <a href="https://stackoverflow.com/questions/3477918/linq-subquery-in">this</a> example to have a sub-query in the where clause of this LINQ query.</p>
  
  <pre><code>var innerquery =
      from app in context.applications
      select new { app.app_id };
  
  IEnumerable&lt;postDatedCheque&gt; _entityList = context.postDatedCheques
      .Where(e =&gt; innerquery.Contains(e.appSancAdvice.application.app_id));
  </code></pre>
  
  <p>The objective was to select those records from <em>postDatedCheques</em> that have <em>app_id</em> in <em>applications</em> table.</p>
  
  <p>But I am getting following erros inside the where clause:</p>
  
  <ol>
  <li>Delegate 'System.Func' does not
  take 1 arguments</li>
  <li>Cannot convert lambda expression to type 'string' because it is not
  a delegate type</li>
  <li>'System.Linq.IQueryable' does not contain a
  definition for 'Contains' and the best extension method overload
  'System.Linq.ParallelEnumerable.Contains(System.Linq.ParallelQuery,
  TSource)' has some invalid arguments</li>
  <li>Instance argument: cannot convert from
  'System.Linq.IQueryable' to
  'System.Linq.ParallelQuery'</li>
  </ol>
  
  <p>What am I coding incorrect?</p>