title: List<Int32> Join with a Table in LINQ-SQL Recommendation Request
body: <p>I have a list of account ids to retrieve from a different context and need to be able to do this:</p>
  
  <pre><code>List&lt;Account&gt; MyMethod(List&lt;int&gt; Accounts)
  {
      List&lt;Account&gt; accounts = dc.Accounts.Join(Accounts,
                                                x =&gt; x.AccountID,
                                                y =&gt; y,
                                                (x, y) =&gt; x).ToList&lt;Account&gt;();
      return accounts;
  }
  </code></pre>
  
  <p>It's obviously not a working query but what is the best way to handle this kind of request?</p>
  
  <p>:::::UPDATE::::</p>
  
  <p>Basically I came up with this solution but it's not complete:</p>
  
  <pre><code>accounts = (from a in dc.Accounts
                          where Accounts.Contains(a.AccountID)
                          select a).ToList&lt;Account&gt;();
  </code></pre>
  
  <p>However, how do you write it as a lambda-expression? I can't get Accounts.Contains(x=>x.AccountID) to work for obvious reasons.</p>