Пример #1
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();
        }
Пример #2
0
        public ApplicationUser GetUser(int commentId)
        {
            var userId = commentUserRepository.Get(cu => cu.CommentId == commentId).UserId;

            return(userRepository.GetById(userId));
        }