コード例 #1
0
        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));
        }
コード例 #2
0
 public IQueryable <T> ProcessSearchSettings <T, S>(PagingInstruction pager, IQueryable <T> query)
 {
     return(DynamicQueryableHelper.ProcessSearchSettings <T, S>(pager, query));
 }
コード例 #3
0
 public IQueryable <TDatasource> ValidatePaging <TDatasource>(PagingInstruction pager, IQueryable <TDatasource> queryable) where TDatasource : class
 {
     return(DynamicQueryableHelper.ValidatePaging(pager, queryable));
 }
コード例 #4
0
 public bool ParseSearchVars <T>(T searchObject, string prefix, ref string queryString, ref object[] parameters)
 {
     return(DynamicQueryableHelper.ParseSearchVars(searchObject, prefix, ref queryString, ref parameters));
 }