title: EF Core 2 duplicate column created with foreign key relationship
body: <p>I'm trying add migration using EF core 2 code first method. The issue is that, the entities with foreign key relationship are created with a foreign key id suffixed with '1' at the end and a redundant column with the same name but without the 1 at the end which is not a foreign key.</p>
  
  <p>Examples are my 2 classes, Store and StoreVisit as shown below:</p>
  
  <p><strong>Store</strong></p>
  
  <pre><code>[Table("Store")]
  public class Store
  {
      public Store()
      {
          StoreVisits = new HashSet&lt;StoreVisit&gt;();
      }
      [Key]
      public int StoreId { get; set; }
  
      [StringLength(30)] 
      public string ShopName { get; set; }
  
      [StringLength(50)]
      public string ShopKeeper { get; set; } 
  
      public string ContactNo { get; set; }
  
      [StringLength(70)]
      public string Address { get; set; }
  
      [StringLength(20)]
      public string Street { get; set; }
  
      [StringLength(50)] 
      public string City { get; set; }
  
      public IEnumerable&lt;StoreVisit&gt; StoreVisits { get; set; }
  }
  </code></pre>
  
  <p><strong>Store Visit</strong></p>
  
  <pre><code>[Table("StoreVisit")]
  public class StoreVisit
  {
  
      [Key]
      public int StoreVisitId { get; set; }
  
      [StringLength(50)]
      public string Location { get; set; }
  
      [StringLength(50)]
      public string Notes { get; set; }
  
      [DataType(DataType.Time)]
      public DateTime StartTime { get; set; }
  
      [DataType(DataType.Time)]
      public DateTime EndTime { get; set; }
  
      public Store Store { get; set; }
  
  }
  </code></pre>
  
  <p>The Visit class is created in the database with the column shown in the image below:</p>
  
  <p><a href="https://i.stack.imgur.com/jQQjX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jQQjX.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the StoreVisit table has columns "StoreId1" which is the actual foreign key and "StoreId" which is not a foreign key.</p>
  
  <p>I have even configured the relationship with Fluent API as below:</p>
  
  <pre><code>            modelBuilder.Entity&lt;Store&gt;()
              .HasMany(c =&gt; c.StoreVisits)
              .WithOne(e =&gt; e.Store)
              .IsRequired();
  </code></pre>
  
  <p>Can someone help.</p>