Beispiel #1
0
        public async Task <List <CommentDto> > GetComments(CommentsQueryDto query)
        {
            var comments = await this._commentRepository.GetCommentsByPostId(query.PostId, query.Take, query.Skip);

            return(_mapper.Map <List <Comment>, List <CommentDto> >(comments));
        }
        public async Task <IActionResult> GetCommentsList([FromQuery] CommentsQueryDto query)
        {
            var result = await _commentService.GetComments(query);

            return(Ok(result));
        }