title: Dapper AddDynamicParams for IN statement with "dynamic" parameter name
body: <p>I have  simple SQL string like this:</p>
  
  <pre><code>"SELECT * FROM Office WHERE OfficeId IN @Ids"
  </code></pre>
  
  <p>The thing is that the @Ids name is entered in an editor so it could be whatever, and my problem is that if I want to pass in, say an array of integers, it only works with Dapper if I use:</p>
  
  <pre><code>var values = new DynamicParameters();
  values.AddDynamicParams(new { Ids = new[] { 100, 101 } });
  </code></pre>
  
  <p>But this requires me to KNOW that the parameter name is <code>Ids</code> and that's not the case in my scenario.</p>
  
  <p>I can set a "dynamic parameter" in Dapper with a "dynamic" name like this:</p>
  
  <pre><code>var values = new DynamicParameters();
  values.Add("Ids", new[] { 100, 101 });
  </code></pre>
  
  <p>But then Dapper doesn't construct the <code>IN (....)</code> SQL with separate parameters for each value.</p>
  
  <p>Is there a way to construct the dynamic object passed in to <code>AddDynamicParams</code> but setting the member name and value without knowing the name beforehand?</p>
  
  <p>I could modify the Dapper source to work for my scenario, but if anyone know of a simpler and elegant solution to this I would be greatful!</p>