title: Dapper ambiguous extension methods
body: <p>I am testing Dapper as a ORM solution and ran into a problem with some extension methods like <code>Execute</code> or <code>QueryMultiple</code>:</p>
  <pre><code>using (SQLiteConnection con = new SQLiteConnection(GetConnectionString()))
  {
      con.Open();
      string sql = @&quot;
          select * from Customer where Id = @id;
          select * from Address where CustomerId = @id;&quot;;
  
      // QueryMultiple extension ambiguous?
      using (var multi = con.QueryMultiple(sql, new { id = 1 }))
      {
          Customer customer = multi.Read&lt;Customer&gt;().Single();
          Address address = multi.Read&lt;Address&gt;().Single();
      }
  
      con.Close();
  }
  </code></pre>
  <p>I get the error</p>
  <blockquote>
  <p>The call is ambiguous between the following methods or properties: 'Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection, string, object, System.Data.IDbTransaction, int?, System.Data.CommandType?)' and 'Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection, string, dynamic, System.Data.IDbTransaction, int?, System.Data.CommandType?)'</p>
  </blockquote>
  <p>and don't know how to properly solve this. The Dapper examples didn't mention such a problem and simply used <code>QueryMultiple</code>. I was able to circumvent the ambiguity using</p>
  <pre><code>var multi = con.QueryMultiple(new CommandDefinition(sql, new { id = 1 }))
  </code></pre>
  <p>But is that really necessary? Is there a better way?</p>