public AddMatchViewModel(IMatchService matchService, ITeamService teamService, IPlayerInningService playerInningService, IUmpireService umpireService) { _matchService = matchService ?? throw new ArgumentNullException($"MatchService is null"); _teamService = teamService ?? throw new ArgumentNullException($"TeamService is null"); _playerInningService = playerInningService ?? throw new ArgumentNullException($"PlayerInningService is null"); _umpireService = umpireService ?? throw new ArgumentNullException($"PlayerInningService is null"); Teams = _teamService.GetTeams().ToList(); Matches = _matchService.GetMatches().ToList(); var UmpiresListWithDupes = _umpireService.GetUmpires().ToList(); Umpires = UmpiresListWithDupes.Distinct().ToList(); }
public TennisGameService(IUmpireService umpireService) { _umpireService = umpireService; }
public AddDialogViewModel(IUmpireService umpireService) { Title = "Add Umpire"; _umpireService = umpireService; }