public CompetitionViewModel(long id, string name, int year, bool started, bool complete, string leagueName, int nextGameDay, ScheduleDaySummaryViewModel nextDayGames, ScheduleDaySummaryViewModel lastDayGames, string champion, string type) : base(id, name, year, started, complete, leagueName, type) { NextGameDay = nextGameDay; NextDayGames = nextDayGames; LastDayGames = lastDayGames; Champion = champion; }
public Task <ScheduleDaySummaryViewModel> GetScheduleDay(int day, int year) { var games = scheduleGameRepository.GetGamesForDay(day, year); var daySummary = new ScheduleDaySummaryViewModel() { Day = day, Year = year, Games = new List <GameSummaryViewModel>() }; var gameSummaries = gameMapper.MapDomainToModel(games).ToList <GameSummaryViewModel>(); daySummary.Games = gameSummaries; return(Task.FromResult(daySummary)); }