title: How to return null from a Dapper query rather than default(T)?
body: <p>I'm using <a href="http://code.google.com/p/dapper-dot-net/" rel="noreferrer">Dapper</a> for some read-only database calls via a stored procedure. I've got a query that will either return 1 row or nothing.</p>
  
  <p>I'm using Dapper like this:</p>
  
  <pre><code>using (var conn = new SqlConnection(ConnectionString))
  {
      conn.Open();
  
      return conn.Query&lt;CaseOfficer&gt;("API.GetCaseOfficer", 
          new { Reference = reference }, 
          commandType: CommandType.StoredProcedure).FirstOrDefault();
  }
  </code></pre>
  
  <p>The returned CaseOfficer object looks like this:</p>
  
  <pre><code>public class CaseOfficer
  {
      public string Title { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Email { get; set; }
      public string Telephone { get; set; }
  }
  </code></pre>
  
  <p>This is then returned through a ASP.NET Web API application as JSON.</p>
  
  <p>When the stored procedure returns a result I get the following:</p>
  
  <pre><code>{
      title: "Mr",
      firstName: "Case",
      lastName: "Officer",
      email: "test@example.com",
      telephone: "01234 567890"
  }
  </code></pre>
  
  <p>But when it returns nothing I get:</p>
  
  <pre><code>{
      title: null,
      firstName: null,
      lastName: null,
      email: null,
      telephone: null
  }
  </code></pre>
  
  <p>How can I get Dapper to return null (so I can check and respond with 404), rather than the default(CaseOfficer)?</p>