Beispiel #1
0
        // GET: QuizController/Create
        public ActionResult Create()
        {
            var result = quizApplicationService.Create();
            var id     = result.CreatedQuizId;

            return(RedirectToAction(nameof(Details), "Quiz", new { id = id }));
        }
        private void StartQuiz()
        {
            var quizCreateResult = quizApplicationService.Create();

            id = quizCreateResult.CreatedQuizId;

            var command       = new QuizGetCommand(id);
            var quizGetResult = quizApplicationService.Get(command);
            var quiz          = quizGetResult.Quiz;

            Question = quiz.Question;
            Choices  = quiz.Choices;

            IsChecked0 = false;
            IsChecked1 = false;
            IsChecked2 = false;
            IsChecked3 = false;
            CanAnswer  = false;
            Correct    = "";
        }