Exemplo n.º 1
0
        public ActionResult EditPredictions(EditPredictionsViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            _predictionService.AddExpertPredictions(
                viewModel.SelectedExpertId,
                viewModel.TourDto.TourId,
                viewModel.MatchTable.Scorelist.Select(s => s.Score).ToList(),
                null,
                _tourService.IsPlayoff(viewModel.TourDto.TourId));
            return(RedirectToAction(
                       "EditPredictions",
                       new
            {
                tourId = viewModel.TourDto.TourId,
                expertId = viewModel.SelectedExpertId
            }));
        }