title: entity framework SaveChanges conflicting changes to the role of the relationship have been detected
body: <p>I have this code:</p>
  
  <pre><code>public class Taxi
  {
       [DataMember]
       public int Id { get; set; }         
  
       [DataMember]
       public string CarModel { get; set; }         
  
       [IgnoreDataMember]
       public virtual ICollection&lt;Order&gt; Orders { get; set; }       
  }
  
  public class Order
  {
       [DataMember]
       public int Id { get; set; }
  
       [DataMember]
       public string AddressFrom { get; set; }
  
       [DataMember]
       public int? TaxisId { get; set; }
  
      [IgnoreDataMember]
       public virtual Taxi Taxi { get; set; }
  }
  </code></pre>
  
  <p>............</p>
  
  <pre><code>public void SomeMethod(int orderId)
  {
     using (var db = new MyDbContext())
     {
        var order = db.Orders.FirstOrDefault(x=&gt;x.Id==orderId);
        if (order!=null) //order.TaxisId = 1
        {
          order.TaxisId = null;
          db.SaveChanges(); //everything Ok! order.TaxisId becomes null
          if (SettingsModel.AutoSetToTheNextTaxi)
          {
            OrderSetTaxis(order.Id, 2, db); //trying to set order.TaxisId to another value.
          }
          ......
          //Some Code
          ......
        }
     }
  }
  
  public void OrderSetTaxis(int orderId, int taxiId, MyDbContext db)
  {
    var order = db.Orders.FirstOrDefault(x=&gt;x.Id==orderId);
    if (order!=null)
    {
      order.TaxisId = taxiId;
      db.SaveChanges(); //this throw exception
    }
  }
  </code></pre>
  
  <p>When i calling method I have this exception - "Conflicting changes to the role 'Order_Taxi_Target' of the relationship 'DispKernel.Entities.MyDbContext.Order_Taxi' have been detected."
  What am I doing wrong?</p>