Ejemplo n.º 1
0
 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()));
 }
Ejemplo n.º 2
0
 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()));
 }
Ejemplo n.º 3
0
        public static IContentQuery <TextContent> WhereCategory(this IContentQuery <TextContent> source, IContentQuery <TextContent> categoryQuery)
        {
            var expression = new WhereCategoryExpression(source.Expression, categoryQuery);

            return(source.Create(expression));
        }