title: Dynamic Linq query Contains List
body: <p>I am using dynamic Linq for generic search.
  I have list of Ids:</p>
  
  <pre><code>List&lt;int&gt; idList = new List&lt;int&gt; { 1, 5, 6};
  </code></pre>
  
  <p>In plain Linq, I would write:</p>
  
  <pre><code>q = q.Where(a =&gt; idList.Contains(a.MyId));
  </code></pre>
  
  <p>But now I have to use <code>System.Linq.Dynamic</code> because I don't know in advance name of the column.</p>
  
  <pre><code>string someId = "CustomId";
  q = q.Where("@0"+ ".Contains(" + someId + ")", idList.ToArray());
  </code></pre>
  
  <p>But this gives error:</p>
  
  <blockquote>
    <p>"No applicable method 'Contains' exists in type 'Int32'"</p>
  </blockquote>
  
  <p>How can I achieve this?</p>
  
  <p>Is there some extension library that implements <code>Contains</code> for <code>dynamic</code> Linq or some other way.</p>