Esempio n. 1
0
        public async Task <ActionResult <CommentReadDto> > GetCommentByIdAsync(int id)
        {
            var comment = await _repository.GetCommentByIdAsync(id);

            if (comment == null)
            {
                return(NotFound());
            }
            return(Ok(_mapper.Map <CommentReadDto>(comment)));
        }