Exemple #1
0
        public async Task <IActionResult> QuizScores(Guid id, string quizName)
        {
            var results = await quizRepo.GetAllResultsByQuizId(id);

            ViewData["QuizName"] = quizName;
            return(View(results));
        }
        //Results
        public async Task <IActionResult> QuizResults(Guid QuizId, string quizName)
        {
            IEnumerable <Result> results = null;

            results = await quizRepo.GetAllResultsByQuizId(QuizId);

            if (QuizId == Guid.Empty)
            {
                return(RedirectToAction(nameof(Quizzes), new { exc = "Wrong QuizId" }));
            }
            ViewData["QuizName"] = quizName;
            return(View(results));
        }