title: More concise way of adding parameters to vendor independent IDataParameterCollection?
body: <p>On every ADO.NET connector we have <code>AddWithValue</code> and hence adding parameters was a breeze.
  I am surprised that that overload is not available on <code>IDataParameterCollection</code> or even on <code>DbParameterCollection</code>. How can I achieve the same with minimal fuss (from both caller and callee side) when writing a vendor independent layer (coding against interface)?</p>
  
  <p>Right now I do: </p>
  
  <pre><code>public void Execute(string query, Action&lt;IDbCommand&gt; parameterizer)
  
  Execute(query, cmd =&gt;
      {
          var param = cmd.CreateParameter();
          param.ParameterName = "user_id";
          param.Value = 1;
          cmd.Parameters.Add(param);
  
          param = cmd.CreateParameter();
          param.ParameterName = "mf";
          param.Value = "6CE71037";
          cmd.Parameters.Add(param);
      });
  </code></pre>
  
  <p>That's too much work isnt it. Otherwise I can change signature:</p>
  
  <pre><code>public void Execute(string query, IEnumerable&lt;KeyValuePair&lt;string, object&gt;&gt; parameters)
  
  var parameters = new Dictionary&lt;string, object&gt; 
                   { { "user_id", 1 }, { "mf", "6CE71037" } };
  Execute(query, parameters);
  </code></pre>
  
  <p>This approach requires I write another loop inside the callee (<code>Execute</code> method). This is almost what I want but just seeing if there is a more concise approach. For instance like this:</p>
  
  <pre><code>public void Execute(string query, Action&lt;IDataParameterCollection&gt; parameterizer)
  
  Execute(query, p =&gt;
      {
          p["user_id"] = 1;
          p["mf"] = "6CE71037";
      });
  </code></pre>
  
  <p>This gives a runtime exception saying <code>Unable to cast object of type 'System.Int32' to type 'System.Data.Common.DbParameter</code>. I understand the error. Just wondering if there is a more elegant pattern..</p>