Ejemplo n.º 1
0
        public CommentDto AddComment(AddCommentRequest addCommentRequest)
        {
            var comment = _newCommentMapper.Map(addCommentRequest);

            _commentRepository.AddComment(comment);

            var user = _userRepository.GetUserById(comment.User.Id);

            comment.User = user;

            return(_masterCommentMapper.Map(comment));
        }
Ejemplo n.º 2
0
        public CommentDto GetComment(int id)
        {
            var comment = _commentRepository.GetCommentById(id);

            return(_masterCommentMapper.Map(comment));
        }