title: Dapper: is it possible to customize the type mapping of a specific field of a specific type?
body: <p>Let's say I have this <code>User</code> class:</p>
  
  <pre><code>public class User
  {
      public int      ID          { get; set; }
      public string   FirstName   { get; set; }
      public string   LastName    { get; set; }
      public string   Email       { get; set; }
      public DateTime DateCreated { get; set; }
      public DateTime LastLogin   { get; set; }
  }
  </code></pre>
  
  <p>Which I want to map to the following table:</p>
  
  <pre><code>CREATE TABLE "user" (
    "ID"          int(11) NOT NULL AUTO_INCREMENT,
    "FirstName"   varchar(45) DEFAULT NULL,
    "LastName"    varchar(45) DEFAULT NULL,
    "Email"       varchar(255) NOT NULL,
    "DateCreated" int(11) NOT NULL,
    "LastLogin"   int(11) NOT NULL,
    PRIMARY KEY ("ID")
  )
  </code></pre>
  
  <p>Or put in simpler words: I want to store the DateTime properties as int fields in the database. However, this is the case for this class/table. Other class/tables might be mapped differently. I was thinking of something along the lines of a custom conversion function in combination with type or member map.</p>
  
  <p>Is it possible to achieve this with Dapper, and if so how?</p>