public async Task <AnswerDto> GetAnswerByIdAsync(Guid id)
        {
            AnswerDto answer = AnswerConverter.Convert(await _answerRepo.GetByIdAsync(id));

            answer.QuestionName = _questionRepo.GetByIdAsync(answer.QuestionId).Result.Text;
            return(answer);
        }
        public async Task <QuestionDto> GetQuestionByIdAsync(Guid id)
        {
            QuestionDto question = QuestionConverter.Convert(await _questionRepo.GetByIdAsync(id));

            question.Answers   = AnswerConverter.Convert(await _answerRepo.GetByQuestionIdAsync(id));
            question.BlockName = _blockRepo.GetByIdAsync(question.BlockId).Result.Name;
            return(question);
        }
 public async Task <bool> UpdateAnswerAsync(AnswerDto item)
 {
     return(await _answerRepo.UpdateAsync(AnswerConverter.Convert(item)));
 }
 public async Task <AnswerDto> CreateAnswerAsync(AnswerDto item)
 {
     return(AnswerConverter.Convert(await _answerRepo.CreateAsync(AnswerConverter.Convert(item))));
 }
 public async Task <List <AnswerDto> > GetAnswerByQuestionIdAsync(Guid id)
 {
     return(AnswerConverter.Convert(await _answerRepo.GetByQuestionIdAsync(id)));
 }
 public async Task <List <AnswerDto> > GetAllAnswerAsync()
 {
     return(AnswerConverter.Convert(await _answerRepo.GetAllAsync()));
 }