public static Lazy <int> LazyCount <T>(this IContentQuery <T> contentQuery) where T : ContentBase { contentQuery = contentQuery.Create(new CallExpression(contentQuery.Expression, CallType.Count)); return(new Lazy <int>(() => (int)contentQuery.Count())); }
public static Lazy <T> LazyLast <T>(this IContentQuery <T> contentQuery) where T : ContentBase { contentQuery = contentQuery.Create(new CallExpression(contentQuery.Expression, CallType.Last)); return(new Lazy <T>(() => contentQuery.Last())); }
public static IContentQuery <TextContent> WhereCategory(this IContentQuery <TextContent> source, IContentQuery <TextContent> categoryQuery) { var expression = new WhereCategoryExpression(source.Expression, categoryQuery); return(source.Create(expression)); }