public void OnGet(int seasonId) { var seasonQuery = new SeasonByIdQuery(seasonId); Season = leagueData.Execute(seasonQuery); MatchSet.SeasonId = seasonId; MatchSet.Date = MatchDayFinder.FindNextMatchDay(); }
public IActionResult OnGet(int id) { if (id != 0) { var query = new SeasonByIdQuery(id); Season = leagueData.Execute(query); if (Season == null) { // todo: better not found page? return(NotFound()); } Header = $"Edit {Season.Name}"; } return(Page()); }