title: Can't get multi-mapping to work in Dapper
body: <p>Playing around with Dapper, I'm quite pleased with the results so far - intriguing!</p>
  
  <p>But now, my next scenario would be to read data from two tables - a <code>Student</code> and an <code>Address</code> table.</p>
  
  <p><code>Student</code> table has a primary key of <code>StudentID (INT IDENTITY)</code>, <code>Address</code> has an <code>AddressID (INT IDENTITY)</code>. <code>Student</code> also has an FK called <code>AddressID</code> linking into the <code>Address</code> table.</p>
  
  <p>My idea was to create two classes, one for each table, with the properties I'm interested in. Additionally, I put an <code>PrimaryAddress</code> property of type <code>Address</code> onto my <code>Student</code> class in C#.</p>
  
  <p>I then tried to retrieve both student and address data in a single query - I mimick the sample that's given on the <a href="https://github.com/StackExchange/dapper-dot-net#multi-mapping" rel="noreferrer">Github page</a>:</p>
  
  <pre><code>var data = connection.Query&lt;Post, User&gt;(sql, (post, user) =&gt; { post.Owner = user; });
  var post = data.First();
  </code></pre>
  
  <p>Here, a <code>Post</code> and a <code>User</code> are retrieved, and the owner of the post is set to the user - the type returned is a <code>Post</code> - correct?</p>
  
  <p>So in my code, I define two parameters to the generic <code>Query</code> extension method - a <code>Student</code> as the first which should be returned, and an <code>Address</code> as the second, which will be stored onto the student instance:</p>
  
  <pre><code>var student = _conn.Query&lt;Student, Address&gt;
                    ("SELECT s.*, a.* FROM dbo.Student s 
                          INNER JOIN dbo.Address a ON s.AddressID = a.AddressID 
                          WHERE s.StudentenID = @Id", 
                      (stu, adr) =&gt; { stu.PrimaryAddress = adr; },  
                      new { Id = 4711 });
  </code></pre>
  
  <p>Trouble is - I get an error in Visual Studio:</p>
  
  <blockquote>
    <p>Using the generic method
    'Dapper.SqlMapper.Query(System.Data.IDbConnection,
    string,
    System.Func,
    dynamic, System.Data.IDbTransaction,
    bool, string, int?,
    System.Data.CommandType?)' requires 6
    type arguments</p>
  </blockquote>
  
  <p>I don't really understand why Dapper insists on using this overload with 6 type arguments... </p>