/// <summary> /// Gets current and upcoming tournaments from TournamentService /// </summary> /// <returns>View with collection of tournaments</returns> public ActionResult Index() { var tournamentsCollections = new TournamentsCollectionsViewModel { Authorization = _authService.GetAllowedOperations(AuthOperations.Tournaments.Create) }; var actualTournaments = _tournamentService.GetActual().ToArray(); tournamentsCollections.CurrentTournaments = actualTournaments .Where(tr => tr.State == TournamentStateEnum.Current); tournamentsCollections.UpcomingTournaments = actualTournaments .Where(tr => tr.State == TournamentStateEnum.Upcoming); return(View(tournamentsCollections)); }