Ejemplo n.º 1
0
        public async Task <PagedList <ItemDto> > Handle(GetItemsQuery request, CancellationToken cancellationToken)
        {
            var includeFn = GetIncludeFn();
            var sortFn    = GetSortFn(request.SortingParams);
            var filterFn  = GetFilterFn(request.FilteringParams);

            var pagedEntities = await _repository.GetPaged(
                page : request.PagingParams.Page,
                pageSize : request.PagingParams.PageSize,
                filter : filterFn,
                sortBy : sortFn,
                include : includeFn,
                cancellationToken : cancellationToken
                );

            return(pagedEntities);
        }