public async Task <QuestionDto> GetQuestionById(Guid id) { Question question = await _repository.GetQuestion(id); return(QuestionDtoExtensions.ToDto(question)); }
public async Task <IEnumerable <QuestionDto> > GetListAllQuestion() { IEnumerable <Question> listQuestions = await _repository.ListAllQuestion(); return(listQuestions.Select(x => QuestionDtoExtensions.ToDto(x))); }