Пример #1
0
        public async Task <IReadOnlyList <Project> > ListAsync(Expression <Func <Project, bool> > where, int pageNumber, CancellationToken cancellationToken = default)
        {
            var specification = new ProjectPagingSpecification(pageNumber, PagingConstants.DefaultPageSize);

            var specificationBuilder = new SpecificationBuilder <Project>(specification);

            specificationBuilder.Where(where).OrderByDescending(e => e.CreationTime);

            return(await _projectRepository.GetListAsync(specification, cancellationToken));
        }