title: Entity Framework Core 2.0 many-to-many relationships same table
body: <p>I'm using <em>Entity Framework Core 2.0</em> to map exist DB, the DB has two tabels: <code>Teams</code> and <code>SupportTeam</code>. </p>
  
  <p><strong>Team Fields:</strong> ID, Name</p>
  
  <p><strong>TeamSupport</strong>: TeamID (ForeignKey on Team  Table), SupportTeamID (ForeignKey on Team  Table)</p>
  
  <p>I tried to map them as following:</p>
  
  <pre><code> public class Team
   {
       public int Id { get; set; }
       public string name { get; set; }
  
       public List&lt;TeamSupport&gt; SupportTeams { get; set; }
  
   }
  
   public class TeamSupport
   {
       public int TeamId { get; set; }
       public virtual Team Team { get; set; }
  
       public int SupportTeamId { get; set; } // In lack of better name.
       public virtual Team SupportTeam { get; set; }
   }
  </code></pre>
  
  <p>But I had the follwing error when i run "add-migration":</p>
  
  <blockquote>
    <p>Unable to determine the relationship represented by navigation
    property 'Team.SupportTeams' of type 'List'. Either
    manually configure the relationship, or ignore this property using the
    '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in
    'OnModelCreating'.</p>
  </blockquote>