Пример #1
0
        public async Task <IActionResult> CreateQuiz(QuizInfoModel model)
        {
            if (ModelState.IsValid)
            {
                SampleQuiz creatingQuiz = new SampleQuiz(model.QuizName, model.DateExpiring, model.QuizGenre);
                await _context.AddSampleQuiz(creatingQuiz);

                return(RedirectToAction("AddQuestions", new { quizId = creatingQuiz.Id }));
            }
            return(View());
        }