Example #1
0
        public bool DeleteComment(string text, ObjectId postId)
        {
            Comment comment = new Comment();

            comment.Text         = text;
            comment.CommentOwner = userRepository.GetUser(userServices.NicknameRead()).Id;
            comment.Time         = DateTime.Now;
            try
            {
                repository.DeleteComment(comment, postId);
                return(true);
            }
            catch
            {
                return(false);
            }
        }