public Match(Team homeTeam, Team awayTeam, int id, Score score) { HomeTeam = homeTeam; AwayTeam = awayTeam; Id = id; Score = score; }
public Player(string firstName, string lastName, decimal salary, DateTime dateOfBirth, Team team) { FirstName = firstName; LastName = lastName; Salary = salary; DateOfBirth = dateOfBirth; Team = team; }
public static void AddTeam(Team team) { if (teams.Any(p=> p.Name == team.Name)) { throw new InvalidOperationException("The " + team.Name + " is already added to the list of Teams"); } else { teams.Add(team); } }
private static void AddTeam(Team newTeam) { League.AddTeam(newTeam); Console.WriteLine("The " + newTeam.Name +" team has been added succesfully"); }