Exemplo n.º 1
0
 public static void UpdateCommentsHostIDs()
 {
     //This iterates through each comment, updating its HostID (host id was added in SVN revision 226
     //NOTE: GJ: This will not perform well if there are thousands of comments
     CommentCollection comments = new CommentCollection();
     comments.Load(Comment.FetchAll());
     foreach (Comment comment in comments) {
         comment.HostID = comment.Story.HostID;
         comment.Save();
     }
 }
Exemplo n.º 2
0
        public static void UpdateCommentsHostIDs()
        {
            //This iterates through each comment, updating its HostID (host id was added in SVN revision 226
            //NOTE: GJ: This will not perform well if there are thousands of comments
            CommentCollection comments = new CommentCollection();

            comments.Load(Comment.FetchAll());
            foreach (Comment comment in comments)
            {
                comment.HostID = comment.Story.HostID;
                comment.Save();
            }
        }
Exemplo n.º 3
0
 public static CommentCollection GetUserComments(int userID, int hostID, int pageNumber, int pageSize)
 {
     CommentCollection comments = new CommentCollection();
     comments.Load(SPs.Kick_GetPagedCommentsByUserIDAndHostID(userID, hostID, pageNumber, pageSize).GetReader());
     return comments;
 }