title: Dapper won't read object properties unless explicitly listed as anonymous type
body: <p>Dapper Query isn't populating parameters from typed objects' properties for some reason.</p>
  
  <p>The following code throws an exception saying I must declare @Username, even though credentials contains property <code>credentials.Username</code>:</p>
  
  <pre><code>const string qryCheckCredentials = "SELECT 1 AS Authenticated FROM dbo.KIUser WHERE Username=@Username AND Password=@PasswordMD5";
  if (!sqlConn.Query&lt;Boolean&gt;(qryCheckCredentials, param: credentials).FirstOrDefault&lt;Boolean&gt;())
      throw new UnauthorizedAccessException..
  </code></pre>
  
  <p>But if I list out the credential properties explicitly into an anonymous object it works fine:</p>
  
  <pre><code>const string qryCheckCredentials = "SELECT 1 AS Authenticated FROM dbo.KIUser WHERE Username=@Username AND Password=@PasswordMD5";
  if (!sqlConn.Query&lt;Boolean&gt;(qryCheckCredentials, param: new { Username = credentials.Username, PasswordMD5 = credentials.PasswordMD5 } ).FirstOrDefault&lt;Boolean&gt;())
      throw new UnauthorizedAccessException..
  </code></pre>
  
  <p>Any ideas why? I'm getting this issue all over my code and can't see a pattern or figure out what I'm missing.</p>
  
  <p>The Credentials type:</p>
  
  <pre><code>[DataContract]
  public class Credentials
  {
      [DataMember]
      public string Username;
      [DataMember]
      public string PasswordMD5;
  }
  </code></pre>
  
  <p>Happens with many types, and listing through them explicitly fixes the issue.</p>
  
  <p>(The DataContract / DataMember attribute decorations are because the object is part of a WDSL interface - probably irrelevant but left here in case they're relevant for some reason beyond my knowledge.)</p>