Esempio n. 1
0
        public async Task <IActionResult> GetById(int id)
        {
            var sentence = await _sentenceService.GetSentenceByIdAsync(id);

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

            var sentenceDto = _mapper.Map <SentenceDto>(sentence);

            return(Ok(sentenceDto));
        }