Entity Framework Code First – two Foreign Keys from same table
Try this: public class Team { public int TeamId { get; set;} public string Name { get; set; } public virtual ICollection<Match> HomeMatches { get; set; } public virtual ICollection<Match> AwayMatches { get; set; } } public class Match { public int MatchId { get; set; } public int HomeTeamId { get; set; } public … Read more