title: There are multiple navigations in entity type 'Messages' which are pointing to same set of properties - 'MessageFrom' using ForeignKeyAttribute
body: <p>I have a table Messages and a table apartments . 
  Messages have MessageFrom related To apartmentId and MessageTo which is  also related to apartment id . 
  i implement my code like always using entity framework core . but things doesn't seems right . 
  Here is my code : </p>
  
  <p>1 - Application DbContext </p>
  
  <pre><code>modelBuilder.Entity&lt;Messages&gt;(entity =&gt;
              {
                  entity.HasKey(e =&gt; e.MessageId);
                  entity.Property(e =&gt; e.DateOfMessage).HasColumnType("DateTime");
                  entity.Property(e =&gt; e.Message).HasColumnType("nvarchar(300)").HasMaxLength(300);
                  entity.Property(e =&gt; e.IsRed).HasColumnName("IsRed").HasColumnType("bit");
                  entity.Property(e =&gt; e.MessageTo).HasColumnType("int");
                  entity.HasOne(e =&gt; e.Apartment).WithMany(x =&gt; x.Messages).HasForeignKey(e =&gt; e.MessageFrom).HasConstraintName("FK_MessageFrom_Apartment");
                  entity.HasOne(e =&gt; e.Apartment).WithMany(x =&gt; x.Messages).HasForeignKey(e =&gt; e.MessageTo).HasConstraintName("FK_MessageTo_Apartment");
  
          });
  </code></pre>
  
  <p>2 - Model Class : </p>
  
  <pre><code>  public class Messages
      {
  
          public int MessageId { get; set; }
  
  
  
  
  
          public int ?MessageFrom { get; set; }
          [ForeignKey("MessageFrom")]
          public Apartment Apartment { get; set; }
  
  
          public int ?MessageTo { get; set; }
          [ForeignKey("MessageTo")]
          public Apartment apartment { get; set; }
          [Required]
          public DateTime DateOfMessage { get; set; }
          [Required]
          public string Message { get; set; }
  
          public bool IsRed { get; set; }
  
      }
  </code></pre>
  
  <p>3 - the problem is:
  <strong>There are multiple navigations in entity type 'Messages' which are pointing to same set of properties - 'MessageFrom' using ForeignKeyAttribute</strong></p>
  
  <p>4- sometimes it gives : 
  Invalid column name 'ApartmentId'.' while i dont have apartmentId at all in model messages</p>