title: DbContext ChangeTracker not working without ForeignKey properties
body: <p>I'm having kind of an issue with the ChangeTracker of DbContext.
  I had a model defined with properties and Data Annotations for the Foreign Keys. For business reasons, I had to change that for FluentAPI, and since then, the ChangeTracker does not recognize changes to the navigation properties anymore.</p>
  
  <p>The scalar properties work just fine and the navigation properties are saved for the database when I call <code>SaveChanges()</code>, but when I try to do the following:</p>
  
  <pre><code>var t = this.Context.ChangeTracker.Entries().Where(
              c =&gt; c.State == EntityState.Modified || 
      c.State == EntityState.Added || 
      c.State == EntityState.Deleted
  );
  </code></pre>
  
  <p>Calling <code>t.Any()</code> always returns false.</p>
  
  <p>Is there a way to solve this or I will have to go back to Data Annotations?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>As requested at comments, I'm showing a class where the problem occurs:</p>
  
  <pre><code>public class C016
      {
          #region Fields
  
          private string _c016Codigo;
          private string _c016Descricao;
          private P029_TipoUnidadeMedida _p029TipoUnidadeMedida;
          private P030_TipoMetricaUnidadeMedida _p030TipoMetricaUnidadeMedida;
  
          #endregion
  
          #region Public Properties
  
          public virtual ObservableCollection&lt;C015_Produto_DadosFiscais&gt; C015_Produto_DadosFiscais { get; set; }
  
          /// &lt;summary&gt;
          /// Código da Unidade de Medida
          /// &lt;/summary&gt;
          [Required, MaxLength(6)]
          [Column(TypeName = "varchar")]
          public string C016_Codigo
          {
              get { return this._c016Codigo; }
              set
              {
                  if (value == this._c016Codigo) return;
                  this._c016Codigo = value;
              }
          }
  
          /// &lt;summary&gt;
          /// Descrição da Unidade de Medida
          /// &lt;/summary&gt;
          [Required, MaxLength(60)]
          [Column(TypeName = "varchar")]
          public string C016_Descricao
          {
              get { return this._c016Descricao; }
              set
              {
                  if (value == this._c016Descricao) return;
                  this._c016Descricao = value;
              }
          }
  
          /// &lt;summary&gt;
          /// Código da Unidade de Medida, Autonumerador
          /// &lt;/summary&gt;
          [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
          public int C016_Id { get; set; }
  
          public byte P029_Id { get; set; }
  
          /// &lt;summary&gt;
          /// Tipo da Unidade de Medida, Fracionário ou Inteira
          /// &lt;/summary&gt;
          [ForeignKey("P029_Id")]
          public virtual P029_TipoUnidadeMedida P029_TipoUnidadeMedida
          {
              get { return this._p029TipoUnidadeMedida; }
              set
              {
                  if (Equals(value, this._p029TipoUnidadeMedida)) return;
                  this._p029TipoUnidadeMedida = value;
              }
          }
  
          /// &lt;summary&gt;
          /// Tipo de métrica da Unidade de medida
          /// &lt;/summary&gt;
          [Required]
          public virtual P030_TipoMetricaUnidadeMedida P030_TipoMetricaUnidadeMedida
          {
              get { return this._p030TipoMetricaUnidadeMedida; }
              set
              {
                  if (Equals(value, this._p030TipoMetricaUnidadeMedida)) return;
                  this._p030TipoMetricaUnidadeMedida = value;
              }
          }
  
          #endregion
      }
  </code></pre>
  
  <p>As you can see, I have two navigation properties. One is set by Data Annotations (P029), and another (P030) is set somewhere else by FluentAPI.
  In my WPF Window, I have two ComboBoxes, one for each navigation property. When I change de "P029" one, the ChangeTracker returns 1 changed entry, but when I change de "P030" one, nothing happens.</p>