Example #1
0
        public async Task Save(Comment comment)
        {
            comment.Content.CheckIfNull(nameof(comment.Content));

            _ = await _draftRepository.Get(comment.DraftId);

            if (comment.ReplyingTo.HasValue)
            {
                var parent = await _commentRepository.Get(comment.ReplyingTo.Value);

                _ = await _commentRepository.AddReply(parent.Id);
            }

            await _commentRepository.Save(comment);
        }