コード例 #1
0
        public IActionResult GetQuestion()
        {
            QuestionAnswerDto        question           = null;
            List <QuestionAnswerDto> questionAnswerList = _QuestionnaireService.PullQuestions().OrderBy(x => x.SurveyId).ToList();

            question = questionAnswerList.First();
            questionAnswerList.Remove(question);
            HttpContext.Session.Set("QuestionAnswerDto", questionAnswerList);

            HttpContext.Session.Set("CurrentQuestionId", question.QuestionId);
            HttpContext.Session.Set("CurrentSurveyId", question.SurveyId);

            return(View("Index", question));
        }