GetSiteContentCommentsByPostType() static private method

static private GetSiteContentCommentsByPostType ( CarrotCMSDataContext ctx, Guid siteID, ContentPageType contentEntry ) : IQueryable
ctx CarrotCMSDataContext
siteID Guid
contentEntry ContentPageType
return IQueryable
Ejemplo n.º 1
0
 public static int GetCommentCountBySiteAndType(Guid siteID, ContentPageType.PageType pageType, bool?approved, bool?spam)
 {
     using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
         return((from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType, approved, spam)
                 select c).Count());
     }
 }
Ejemplo n.º 2
0
        public static List <PostComment> GetCommentsBySitePageNumber(Guid siteID, int iPageNbr, int iPageSize, string SortBy, ContentPageType.PageType pageType, bool?approved, bool?spam)
        {
            int startRec = iPageNbr * iPageSize;

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

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