private Tuple <IQueryable <TEntity>, IQueryable <TEntity> > PaginateInternal <TEntity, TSearch>(IQueryable <TEntity> query, TSearch searchObject, PagingInstruction pagingInstruction, Expression <Func <TEntity, bool> > predicate = null, string prefix = null) { var queryString = string.Empty; var parameters = new object[] { }; if (DynamicQueryableHelper.ParseSearchVars(searchObject, ref queryString, ref parameters)) { query = query.Where(queryString, parameters); } if (predicate != null) { query = query.Where(predicate); } var collection = DynamicQueryableHelper.ProcessSearchSettings <TEntity, TSearch>(pagingInstruction, query); return(new Tuple <IQueryable <TEntity>, IQueryable <TEntity> >(query, collection)); }
public IQueryable <T> ProcessSearchSettings <T, S>(PagingInstruction pager, IQueryable <T> query) { return(DynamicQueryableHelper.ProcessSearchSettings <T, S>(pager, query)); }
public IQueryable <TDatasource> ValidatePaging <TDatasource>(PagingInstruction pager, IQueryable <TDatasource> queryable) where TDatasource : class { return(DynamicQueryableHelper.ValidatePaging(pager, queryable)); }
public bool ParseSearchVars <T>(T searchObject, string prefix, ref string queryString, ref object[] parameters) { return(DynamicQueryableHelper.ParseSearchVars(searchObject, prefix, ref queryString, ref parameters)); }