title: How do you do a SQL style 'IN' statement in LINQ to Entities (Entity Framework) if Contains isn't supported?
body: <p>I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query.  Here is my query at the moment:</p>
  
  <pre><code>var items = db.InventoryItem
                  .Include("Kind")
                  .Include("PropertyValues")
                  .Include("PropertyValues.KindProperty")
                  .Where(itm =&gt; valueIds.Contains(itm.ID)).ToList&lt;InventoryItem&gt;();
  </code></pre>
  
  <p>When I do this however, the following exception is thrown:</p>
  
  <blockquote>
    <p>LINQ to Entities does not recognize the method 'Boolean Contains(Int64)' method, and this method cannot be translated into a store expression.</p>
  </blockquote>
  
  <p>Does anyone have a workaround or another solution for this?</p>