public void DeleteCommentUser(string userId, int commentId) { var commentUser = commentUserRepository.Get(cu => cu.UserId == userId && cu.CommentId == commentId); commentUserRepository.Delete(commentUser); SaveCommentUser(); }
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(); }