static private GetSiteContentCommentsByPostType ( CarrotCMSDataContext ctx, Guid siteID, ContentPageType contentEntry ) : IQueryable |
||
ctx | CarrotCMSDataContext | |
siteID | Guid | |
contentEntry | ContentPageType | |
return | IQueryable |
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()); } }
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()); } }