Beispiel #1
0
        public IActionResult TaskEight(int?rating)
        {
            if (!rating.HasValue)
            {
                return(RedirectToAction(nameof(TaskEight), new { rating = VSU_RATING }));
            }

            UniversityDto[] universityDtos = universitiesService.GetUniversitiesAboveRating(rating.Value);
            var             vm             = new TaskEightViewModel()
            {
                Rating       = rating.Value,
                Universities = universityDtos
            };

            return(View(vm));
        }
 public UniversityDto[] GetTaskEightData()
 {
     return(universitiesService.GetUniversitiesAboveRating(VSU_RATING));
 }