title: one to one relationship with fluent api
body: <p><strong>Model:</strong></p>
  
  <pre><code>public class User {
      public Guid UserId { get; set; }
      public string UserName { get; set; }
      public virtual Membership Membership { get; set; }
  }
  
  public class Membership {
      public Guid UserId { get; set; }
      public DateTime CreateDate { get; set; }
  }
  </code></pre>
  
  <p><strong>DbContext:</strong></p>
  
  <pre><code>public class UsersContext : DbContext {
      public UsersContext() : base("ApplicationServices") { }
      public DbSet&lt;User&gt; Users { get; set; }
      public DbSet&lt;Membership&gt; Memberships { get; set; }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder) {
          modelBuilder.Entity&lt;User&gt;().ToTable("aspnet_Users");
          modelBuilder.Entity&lt;Membership&gt;().ToTable("aspnet_Membership");
  
          //insert relation here to join the two tables
      }
  }
  </code></pre>
  
  <p>This is my first day playing around with the fluent api and i was just wondering how i would be able to join these two tables. How would i define the relation?</p>
  
  <p>Also, any tutorials on the fluent API that have helped you?</p>