Example #1
0
        // GET: QuizController/Details/5
        public ActionResult Details(string id)
        {
            var command = new QuizGetCommand(id.ToString());
            var result  = quizApplicationService.Get(command);
            var quiz    = new QuizResponseModel(result.Quiz);

            return(View(Tuple.Create(quiz, new QuizAnswerRequestModel())));
        }
        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    = "";
        }