public async Task <IActionResult> GetComments(int articleId) { var commentsFromRepo = await _repo.GetCommentsAsync(articleId); var comments = _mapper.Map <IEnumerable <CommentsToReturnDto> >(commentsFromRepo); return(Ok(comments)); }
public async Task <IActionResult> GetComments(int articleId) { var commentsFromRepo = await _repo.GetCommentsAsync(articleId); var comments = _mapper.Map <IEnumerable <CommentsToReturnDto> >(commentsFromRepo); return(Ok(comments)); }