title: using .Contains() with linq-to-sql
body: <p>I have the following query that receives a list of ints as a parameter:</p>
  
  <pre><code>public int GetMostRecent(List&lt;int&gt; TheIDs)
  {
   ...using MyDC...
  
     var TheMostRecentID = (from d in MyDC.Data
                             where TheIDs.Contains(d.ID)
                             orderby d.DateTime
                             select d.ID).LastOrDefault(); 
  }
  </code></pre>
  
  <p>Is this the best way to match a list within a parameter collection to data in the database or is there a better way than using the .Contains() method in linq-to-sql.</p>
  
  <p>Thanks.</p>