DynamicParameters.Output<T> doesn't map the output to the model
<p>I'm using Dapper to execute a stored procedure that returns back two output parameters. Once is a xml data type and the other is an integer. I'm trying to use the <code>Output&lt;T&gt;</code> method on the <code>DynamicParameters</code> Type. When I use it however, the value assigned is always <code>default(T)</code>, so in this example <code>TotalNoOfUsers</code> is 0.</p>

<p>This is my example model i'm working off of.</p>

<pre><code>public class Foo
{
    public string Xml { get; set; }

    public int NumberOfUsers { get; set; }
}
</code></pre>

<p>The following is a unit test that I wrote to demonstrate the behavior.</p>

<pre><code>[TestMethod]
public async Task Test()
{
    var foo = new Foo();
    var connection = new SqlConnection(this.connectionString);
    await connection.OpenAsync();

    var parameters = new DynamicParameters();
    parameters.Add("ApplicationInstanceRoleId", this.roleId);
    parameters.Add("TotalNoOfUsers", 0, DbType.Int32, ParameterDirection.Output);
    parameters.Output(foo, output =&gt; output.NumberOfUsers);

    await connection.ExecuteAsync(
        "USP_Get_UsersAndAccessControlXML4ApplicationRole",
        parameters,
        commandType: CommandType.StoredProcedure);

   Assert.AreNotEqual(0, foo.NumberOfUsers);
}
</code></pre>

<p>I can however use the <code>Get&lt;T&gt;</code> method and it will give me back the expected output.</p>

<pre><code>[TestMethod]
public async Task Test()
{
    var foo = new Foo();
    var connection = new SqlConnection(this.connectionString);
    await connection.OpenAsync();

    var parameters = new DynamicParameters();
    parameters.Add("ApplicationInstanceRoleId", this.roleId);
    parameters.Add("TotalNoOfUsers", 0, DbType.Int32, ParameterDirection.Output);

    await connection.ExecuteAsync(
        "USP_Get_UsersAndAccessControlXML4ApplicationRole",
        parameters,
        commandType: CommandType.StoredProcedure);

    foo.NumberOfUsers = parameters.Get&lt;int&gt;("TotalNoOfUsers");
    Assert.AreNotEqual(0, foo.NumberOfUsers);
}
</code></pre>

<p>Am I using the <code>Output&lt;T&gt;</code> incorrectly?</p>