예제 #1
0
        public void DeleteCommentUser(string userId, int commentId)
        {
            var commentUser = commentUserRepository.Get(cu => cu.UserId == userId && cu.CommentId == commentId);

            commentUserRepository.Delete(commentUser);
            SaveCommentUser();
        }
예제 #2
0
        public void DeleteComment(int id)
        {
            var comment = commentRepository.GetById(id);

            commentRepository.Delete(comment);
            var commentUser = commentUserRepository.Get(cu => cu.CommentId == id);

            commentUserRepository.Delete(commentUser);
            SaveComment();
        }