示例#1
0
        public static UserCommentsViewModel ByIP(string ip, int page)
        {
            var total    = CommentModel.CountCommentsByIP(ip);
            var comments = CommentModel.GetCommentsByIP(ip, (page - 1) * CommentsPerPage, CommentsPerPage);

            return(new UserCommentsViewModel("by-ip/" + Uri.EscapeDataString(ip), comments, page, total));
        }