title: Property or navigation with the same name already exists on entity type - how to add foreign keys in migration scenario of Entity Framework
body: <p>I have this class with only the foreign key references:</p>
  
  <pre><code>public class Device
  {
      [Required]
      [DataMember(Name = "key")]
      [Key]
      public Guid Key { get; set; }
  
      [ForeignKey("DeviceType")]
      [IgnoreDataMember]
      public virtual DeviceType DeviceType { get; set; }
  
      [ForeignKey("Model")]
      [IgnoreDataMember]
      public virtual ModelType Model { get; set; }
  }
  </code></pre>
  
  <p>I get an error while running the command</p>
  
  <pre><code> Add-Migration -Name "DeviceMigration"
  </code></pre>
  
  <p>Error is:</p>
  
  <blockquote>
    <p>The property or navigation 'DeviceType' cannot be added to the entity type 'Device' because a property or navigation with the same name already exists on entity type 'Device'.</p>
  </blockquote>
  
  <p>This is my context class content</p>
  
  <pre><code> public class MyContext: DbContext
   {
       public MyContext(DbContextOptions&lt;MyContext&gt; options)
          : base(options)
       { }
  
       public DbSet&lt;DeviceType&gt; DeviceTypes { get; set; }
       public DbSet&lt;Device&gt; Devices { get; set; }
   }
  </code></pre>