title: disconnected dbcontext does not update navigation property
body: <p>I am writing an API using WebAPI 2.0 and EF6.0 using code first.
  So its necessarily a disconnected dbcontext scenario.</p>
  
  <p>My domain is as as below</p>
  
  <pre><code>public class Patient
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public string Email ( get; set; }
      public virtual Nutritionist Nutritionist { get; set; }
  }
  
  public class Nutritionist
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public virtual List&lt;Patient&gt; Patients { get; set; }
  }
  </code></pre>
  
  <p>The UI will allow Patient to select a different Nutritionist if she is not happy with current one. So my API needs to support this. I presumed this would be a simple update on the Patient. But following unit test fails.</p>
  
  <pre><code>    [TestMethod]
      public void Changing_Nutritionist_In_Disconnected_Context_Works()
      {
          Patient p;
          Nutritionist n;
          using (var c = new Context())
          {
              // Get a patient where I know p.Nutritionist.Id == 1 in database.
              p = c.Patients.Find(1);
  
              // Get some other nutritionist
              n = c.Nutritionists.Find(3);
          }
          using (var c = new Context())
          {
              //change patient's email and nutritionist 
              p.Email = "patient@domain.com";
              p.Nutritionist = n;
  
              c.Patients.Attach(p);
              c.Entry(p).State = EntityState.Modified;
              c.SaveChanges();
          }
          using (var c = new Context())
          {
              Assert.AreEqual(3,c.Patients.Find(1).Nutritionist.Id);
          }
      }
  </code></pre>
  
  <p>I expected that <code>SaveChanges()</code> would save changes to both properties of the patient <code>p.Email</code> and <code>p.Nutritionist</code>. But in database, only the email is changed and <code>Nutritionist_Id</code> field continues to show old value. So for some reason, dbContext is ignoring changes to navigation property <code>p.Nutritionist</code></p>
  
  <p>The SQL profiler shows following UPDATE query fired by EF</p>
  
  <pre><code>exec sp_executesql N'UPDATE [dbo].[Patients]
  SET [Name] = @0, [Email] = @1
  WHERE ([Id] = @2)
  ',N'@0 nvarchar(max) ,@1 nvarchar(max) ,@2 int',@0=N'some name',@1=N'patient@domain.com',@2=1
  go
  </code></pre>
  
  <p>Wonder what i could be missing out on.</p>