Carrotware.CMS.Core.CannedQueries.GetSiteContentCommentsByPostType C# (CSharp) Method

GetSiteContentCommentsByPostType() static private method

static private GetSiteContentCommentsByPostType ( CarrotCMSDataContext ctx, Guid siteID, ContentPageType contentEntry ) : IQueryable
ctx CarrotCMSDataContext
siteID Guid
contentEntry ContentPageType
return IQueryable
        internal static IQueryable<vw_carrot_Comment> GetSiteContentCommentsByPostType(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType contentEntry)
        {
            return (from r in ctx.vw_carrot_Comments
                    orderby r.CreateDate descending
                    where r.SiteID == siteID
                        && r.ContentTypeID == ContentPageType.GetIDByType(contentEntry)
                    select r);
        }

Same methods

CannedQueries::GetSiteContentCommentsByPostType ( CarrotCMSDataContext ctx, Guid siteID, ContentPageType contentEntry, bool approved, bool spam ) : IQueryable

Usage Example

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());
     }
 }
All Usage Examples Of Carrotware.CMS.Core.CannedQueries::GetSiteContentCommentsByPostType