예제 #1
0
        public async Task <ActionResult <QuestionResponse> > GetQuestion(int id)
        {
            var question = await _context.Question.Where(x => x.Id == id).Include(b => b.answers).FirstOrDefaultAsync();

            if (question == null)
            {
                return(NotFound());
            }

            return(SurveyService.CreateQuestionResponse(question));
        }