Exemplo n.º 1
0
        // Filter for PageQuery<T>
        public static PageQuery <T> Filter <T>(this PageQuery <T> pageQuery, Expression <Func <T, bool> > filterExp)
        {
            pageQuery.FilterDefinition = Builders <T> .Filter.Where(filterExp);

            return(pageQuery);
        }
Exemplo n.º 2
0
        // Project for PageQuery<T, P>
        public static PageQuery <T, P> Project <T, P>(this PageQuery <T, P> pageQuery, Expression <Func <T, P> > projectionExp)
        {
            pageQuery.ProjectionDefinition = Builders <T> .Projection.Expression(projectionExp);

            return(pageQuery);
        }