title: Foreign key on the same properties already exists
body: <p>I have Table1 and Table2.</p>
  
  <p>Table1 has a <code>foreignKey</code> pointing to Table2 primary Key. It could be a bad design, but I cannot change it as it is old.</p>
  
  <p>Now I want to use EF with code first and tried to generate a model and DbContext classes for it through the following command:</p>
  
  <pre><code>dotnet ef dbcontext scaffold "Server=Server1;Database=DBName;Integrated Security=True;MultiSubnetFailover=True;" Microsoft.EntityFrameworkCore.SqlServer -o Models
  </code></pre>
  
  <p>And getting the following error:</p>
  
  <blockquote>
    <p>The foreign key {'ForeignKeyId'} cannot be added to the entity type
    'TABLENAME' because a foreign key on the same properties already
    exists on entity type 'TABLENAME' and also targets the key
    {'FOREIGNKEY'} on 'FOREIGNKEY_PrimaryTable'.</p>
  </blockquote>
  
  <p>Is there a way I can overcome this error?</p>