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(); }
public ApplicationUser GetUser(int commentId) { var userId = commentUserRepository.Get(cu => cu.CommentId == commentId).UserId; return(userRepository.GetById(userId)); }