GetContentPageComments() static private method

static private GetContentPageComments ( CarrotCMSDataContext ctx, Guid rootContentID, bool bActiveOnly ) : IQueryable
ctx CarrotCMSDataContext
rootContentID Guid
bActiveOnly bool
return IQueryable
Exemplo n.º 1
0
 public static int GetCommentCountByContent(Guid rootContentID, bool?approved, bool?spam)
 {
     using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
         return((from c in CannedQueries.GetContentPageComments(_db, rootContentID, approved, spam)
                 select c).Count());
     }
 }
Exemplo n.º 2
0
 public static int GetCommentCountByContent(Guid rootContentID, bool bActiveOnly)
 {
     using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
         return((from c in CannedQueries.GetContentPageComments(_db, rootContentID, bActiveOnly)
                 select c).Count());
     }
 }
Exemplo n.º 3
0
        public static List <PostComment> GetCommentsByContentPage(Guid rootContentID, bool bActiveOnly)
        {
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                IQueryable <vw_carrot_Comment> lstComments = (from c in CannedQueries.GetContentPageComments(_db, rootContentID, bActiveOnly)
                                                              select c);

                return(lstComments.Select(x => new PostComment(x)).ToList());
            }
        }
Exemplo n.º 4
0
        public static List <PostComment> GetCommentsByContentPageNumber(Guid rootContentID, int iPageNbr, int iPageSize, string SortBy, bool?approved, bool?spam)
        {
            int startRec = iPageNbr * iPageSize;

            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                IQueryable <vw_carrot_Comment> lstComments = (from c in CannedQueries.GetContentPageComments(_db, rootContentID, approved, spam)
                                                              select c);

                return(PaginateComments(lstComments, iPageNbr, iPageSize, SortBy).ToList());
            }
        }