// 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); }
// 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); }