title: dapper map one to one in classmapper
body: <p>I have 2 simple tables.</p>
  
  <pre><code>create table Owner
  (
      Id int primary key,
      Name nvarchar(100),
  );
  
  create table Status
  (
      Id int primary key,
      BrandName nvarchar(50)
      OwnerId int foreign key references Owner(Id),
  );
  </code></pre>
  
  <p>In app I map these tables to model classes:</p>
  
  <pre><code>public class Owner
  {
      public int Id {get;set;}
      public string Name{get;set;}
      public Status Status {get;set;}
  }
  
  
  public class Status
  {
      public int Id {get;set;}
      public string Brand {get;set;}
      public int OwnerId {get;set;}
  }
  </code></pre>
  
  <p>I use dapper and dapper extension.</p>
  
  <p>I would like map relation one to one in dapper in classmapper. It’s possible?</p>
  
  <p>My goal is when I added owner object which has set up also property Status to db via repository 
  it also insert record do status table.</p>
  
  <p>What is best way to achieve this behavior?</p>
  
  <pre><code>public class OwnerMapper : ClassMapper&lt;Owner&gt;
  {
      public OwnerMapper()
      {
          Table("Owner");
          Map(p=&gt;p.Id).Column("Id").Key(KeyType.Assigned);
          Map(p=&gt;p.Name).Column("Name");
          //how map property status
  
      }
  }
  
  
  public class StatusMapper : ClassMapper&lt;Status&gt;
  {
      public StatusMapper()
      {
          Table("Status");
          Map(p=&gt;p.Id).Column("Id").Key(KeyType.Identity);
          Map(p=&gt;p.Brand).Column("BrandName");
          Map(p=&gt;OwnerId).Column("OwnerId");
  
      }
  }
  </code></pre>