title: Is there a way to map a property to a custom type in Dapper?
body: <p>We are looking at Dapper to simplify our mapping logic.  It looks pretty promising except for one thing.  We use custom types for our ids.  For example:</p>
  
  <pre><code>public class MyEntityIdentity 
  {
      public int IdentityValue { get; }
      public MyEntityIdentity(int identity) { IdentityValue = identity; }
  }
  
  public class MyEntity
  {
      public MyEntityIdentity Identity { get; set; }
      int Prop1 { get; set; }
      string Prop2 { get; set; }
      bool Prop3 { get; set; }
  }
  </code></pre>
  
  <p>With the SQL table looking something like:</p>
  
  <pre><code>create table [dbo].[MyEntity] (
      my_entity_id int identity(1,1) NOT NULL,
      prop1 int NULL,
      prop2 varchar(100) NULL,
      prop3 bit NOT NULL
  
      CONSTRAINT PK_MyEntity PRIMARY KEY CLUSTERED (my_entity_id ASC)
  )
  </code></pre>
  
  <p>How can we map the "Identity" property?</p>