如果我有这个,我该如何首先在EF Core中将其作为代码?
会是
public class Schedule
{
public int Id { get; set; }
public Team HomeTeam { get; set; }
public int HomeTeamId { get; set; }
public Team AwayTeam { get; set; }
public int AwayTeamId { get; set; }
public Team WinningTeam { get; set; }
public int WinningTeamId { get; set; }
}
public class Team
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Schedule> Schedules { get; set; }
// do I need to do the collection 3 times?
}