Ejemplo n.º 1
0
 public abstract IPaged <T> GetPaged(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate);
Ejemplo n.º 2
0
 public abstract Task <IPaged <T> > GetPagedAsync(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate,
     CancellationToken ctok);
Ejemplo n.º 3
0
 public Task <IPaged <T> > GetPagedAsync(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom)
 {
     return(GetPagedAsync(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, null, CancellationToken.None));
 }
Ejemplo n.º 4
0
 public abstract IPaged <TResult> GetPaged <TResult>(
     Expression <Func <T, TResult> > selector,
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate)
     where TResult : class;
Ejemplo n.º 5
0
 public IPaged <T> GetPaged(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom)
 {
     return(GetPaged(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, null));
 }
Ejemplo n.º 6
0
 public Task <IPaged <T> > GetPagedAsync(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate)
 {
     return(GetPagedAsync(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, predicate, null, CancellationToken.None));
 }
Ejemplo n.º 7
0
 public override IPaged <T> GetPaged(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate)
 {
     return(GetPaged(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, predicate, null));
 }
Ejemplo n.º 8
0
 public IPaged <T> GetPaged(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Func <IQueryable <T>, IQueryable <T> > include)
 {
     return(GetPaged(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, null, include));
 }
Ejemplo n.º 9
0
 public abstract Task <IPaged <TResult> > GetPagedAsync <TResult>(
     Expression <Func <T, TResult> > selector,
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate,
     CancellationToken ctok)
     where TResult : class;
Ejemplo n.º 10
0
 public Task <IPaged <T> > GetPagedAsync(
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Func <IQueryable <T>, IQueryable <T> > include,
     CancellationToken ctok)
 {
     return(GetPagedAsync(searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, null, include, ctok));
 }
Ejemplo n.º 11
0
 public IPaged <TResult> GetPaged <TResult>(
     Expression <Func <T, TResult> > selector,
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom)
     where TResult : class
 {
     return(GetPaged(selector, searchFields, pageIndex, pageSize, sorts, keyword, indexFrom, null));
 }
Ejemplo n.º 12
0
 public ReadPagedInterceptorArgs(
     string[] searchFields,
     Expression <Func <T, bool> > predicate,
     Func <object, Task> pagedValidation,
     Func <IQueryable <T>, IQueryable <T> > include,
     PageIndexFrom defaultPageIndexFrom)
 {
     SearchFields         = searchFields;
     Predicate            = predicate;
     PagedValidation      = pagedValidation;
     Include              = include;
     DefaultPageIndexFrom = defaultPageIndexFrom;
 }
Ejemplo n.º 13
0
        public static PageQuery GetPageQueryMapping(
            string[] searchFields,
            int pageIndex           = PageQuery.DefaultIndexFrom,
            int pageSize            = PageQuery.DefaultPageSize,
            string[] sorts          = null,
            string keyword          = null,
            PageIndexFrom indexFrom = null)
        {
            if (searchFields == null || !searchFields.Any())
            {
                throw new ArgumentNullException(nameof(searchFields));
            }

            return(PageQuery.Get(pageIndex, pageSize, sorts, keyword, indexFrom, searchFields));
        }
Ejemplo n.º 14
0
 public override Task <IPaged <TResult> > GetPagedAsync <TResult>(
     Expression <Func <T, TResult> > selector,
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Expression <Func <T, bool> > predicate,
     CancellationToken ctok)
 {
     return(GetPagedAsync(
                selector,
                searchFields,
                pageIndex,
                pageSize,
                sorts,
                keyword,
                indexFrom,
                predicate,
                null,
                ctok));
 }
Ejemplo n.º 15
0
 public Task <IPaged <TResult> > GetPagedAsync <TResult>(
     Expression <Func <T, TResult> > selector,
     string[] searchFields,
     int pageIndex,
     int pageSize,
     string[] sorts,
     string keyword,
     PageIndexFrom indexFrom,
     Func <IQueryable <T>, IQueryable <T> > include)
     where TResult : class
 {
     return(GetPagedAsync(
                selector,
                searchFields,
                pageIndex,
                pageSize,
                sorts,
                keyword,
                indexFrom,
                null,
                include,
                CancellationToken.None));
 }