コード例 #1
0
        public async Task <QuestionDto> GetQuestionById(Guid id)
        {
            Question question = await _repository.GetQuestion(id);

            return(QuestionDtoExtensions.ToDto(question));
        }
コード例 #2
0
        public async Task <IEnumerable <QuestionDto> > GetListAllQuestion()
        {
            IEnumerable <Question> listQuestions = await _repository.ListAllQuestion();

            return(listQuestions.Select(x => QuestionDtoExtensions.ToDto(x)));
        }