Exemple #1
0
        public async Task <ActionResult <IEnumerable <OptionDto> > > GetOptions(Guid questionId)
        {
            if (!await _questionRepository.isExists(questionId))
            {
                return(NotFound());
            }

            var optionsFromRepo = await _optionRepository.GetOptionAsync(questionId);

            return(Ok(_mapper.Map <IEnumerable <OptionDto> >(optionsFromRepo)));
        }