Unable to update Foreign Key in Entity Framework 6
问题 I am trying to do a simple update to the foreign key but the script never get sent over. Here is the code I am using: using (var db = new MyContext()) { db.Entry<Contact>(newContact).State = EntityState.Modified; newContact.ContactOwner = db.Person.Find(3); db.SaveChanges(); } EF6 update the rest of the column in the Persons table but it is not updating the Contact_Id in Persons table. Person entity: public class Person { public int Id { get; set; } public string Name { get; set; } public