Пример #1
0
        public Task <PagedResult <TResult> > QueryByResultAsync <TResult>(QueryArgs args, ModelConvertOptions options = null)
        {
            if (args == null)
            {
                throw new ArgumentNullException(nameof(args));
            }

            if (args.Sort.IsNullOrEmpty())
            {
                args.SetDefaultSort <TEntity>(DefaultSort);
            }

            return(QueryFilter(Table, args).PagedResultByResultAsync <TEntity, TResult>(args, options));
        }
Пример #2
0
        public Task <PagedResult <TEntity> > QueryAsync(QueryArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException(nameof(args));
            }

            if (args.Sort.IsNullOrEmpty())
            {
                args.SetDefaultSort <TEntity>(DefaultSort);
            }

            return(QueryFilter(Table, args).PagedResultAsync(args));
        }