Пример #1
0
        //model or Dto?
        public ActionResult EditTour(int tourId)
        {
            //optimization: tour with matches
            var tourDto = _tourService.GetTourDto(tourId);
            var teams   = _teamService.GetLastTournamentTeams();
            //var matches = _matchService.GetLastTournamentMatchesByTourId(tourId);
            var matches   = _matchService.GetTourSchedule(tourId);
            var scorelist = _matchService.GenerateScorelist(tourId);

            return(View(new EditTourViewModel(teams, matches, scorelist, tourDto)));
        }