title: EF Foreign Key using Fluent API
body: <p>Here are my models. I have one to one mapping for Vehicle and Driver. I will have the vehicle created first and then map the driver to the vehicle.</p>
  
  <pre><code>public class Driver
  {
      public int Id { get; set; }
      public String Name { get; set; }
      public int VehicleId { get; set; }
      public virtual Vehicle Vehicle  { get; set; }
  }
  
  public class Vehicle
  {  
      public int Id { get; set; }
      public String Name { get; set; }
  
      public virtual Driver Driver { get; set; }
  
      public int VehicleGroupId { get; set; }
      public virtual VehicleGroup Vehicles { get; set; }
  }
  </code></pre>
  
  <p>I want to use VehicleId property in Driver class to keep id of vehicle the driver is driving.</p>
  
  <p>I've written the following Fluent API code:</p>
  
  <pre><code>modelBuilder.Entity&lt;Vehicle&gt;()
              .HasRequired(d =&gt; d.Driver)
              .WithRequiredPrincipal();
  </code></pre>
  
  <p>But it creates a new column in Drivers table - Vehicle_VehicleId and maps it to the VehicleId on Vehicle table. I want the VehicleId of Driver table to map.</p>
  
  <p>Also, i'm brand new to EF and Fluent API. I find it extremely confusing choosing between WithRequiredDependent and WithRequiredPrincipal. Would be glad if you can describe it in simple words. Thanks.</p>