title: LINQ/Lambda equivalent of SQL in
body: <p>I have an IEnumerable that has a list of objects with ids. I want to select those objects whose IDs are 1, 2, 7, 8, 9, 10, and 11. I don't know the LINQ/Lambda equivalent of the equivalent SQL statement (select * where id in (1, 2, 7, 8, 9, 10, 11)). </p>
  
  <p>I tried something like: </p>
  
  <pre><code>var movieratings = new int[] {1, 2, 7, 8, 9, 10, 11};
  list.ratings= list.ratings.Select(x =&gt; movieratings.Contains(x.Value));
  </code></pre>
  
  <p>But that gives me a compile error like saying the type arguments cannot be inferred from usage. </p>