title: Entity Framework Core - Multiple one-to-many relationships between two entities
body: <p>I have two entities - <strong>Team</strong> and <strong>Game</strong>. A team can have many games (One-To-Many).</p>
  
  <p>So that would look something like this:</p>
  
  <pre><code> public class Team
      {
          public int Id { get; set; }
          public string Name { get; set; }
  
          public ICollection&lt;Game&gt; Games { get; set; }
      }
  
   public class Game
      {
          public int Id { get; set; }
          public DateTime Date { get; set; }
  
          public int TeamId { get; set; }
          public Team Team { get; set; }
      }
  </code></pre>
  
  <p>This works nice, but I want to make it a little more refined by splitting the games into two categories - Home and Away games. This will however introduce another relationship between the two entities and I'm not sure how to define it.</p>
  
  <p>I imagine it will be something like this?</p>
  
  <pre><code> public class Team
      {
          public int Id { get; set; }
          public string Name { get; set; }
  
          public ICollection&lt;Game&gt; HomeGames { get; set; }
          public ICollection&lt;Game&gt; AwayGames { get; set; }
      }
  
  public class Game
      {
          public int Id { get; set; }
          public DateTime Date { get; set; }
  
          public int HomeTeamId { get; set; }
          public Team HomeTeam { get; set; }
  
          public int AwayTeamId{ get; set; }
          public Team AwayTeam { get; set; }
      }
  </code></pre>
  
  <p>Doing this confuses Entity Framework and it can't decide how to settle the relationships.</p>
  
  <p>Any ideas?</p>