title: Unable to update Foreign Key in Entity Framework 6
body: <p>I am trying to do a simple update to the foreign key but the script never get sent over.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>using (var db = new MyContext())
  {
        db.Entry&lt;Contact&gt;(newContact).State = EntityState.Modified;
        newContact.ContactOwner = db.Person.Find(3);
        db.SaveChanges();
  }
  </code></pre>
  
  <p>EF6 update the rest of the column in the Persons table but it is not updating the Contact_Id in Persons table.</p>
  
  <p>Person entity:</p>
  
  <pre><code>public class Person
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public List&lt;Contact&gt; ContactList { get; set; }
  }
  </code></pre>
  
  <p>Contact entity:</p>
  
  <pre><code>public class Contact
  {
      public int Id { get; set; }
      public string Email { get; set; }
      public string TelNo { get; set; }
      public Person ContactOwner { get; set; }
  }
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Please help!</p>