Пример #1
0
 public PersonSpecification(GetPersonsQuery filter)
 {
     _filter = filter;
 }
Пример #2
0
        public async Task <PagedList <PersonModel> > Handle(GetPersonsQuery request, CancellationToken cancellationToken)
        {
            var data = _unitOfWork.PersonRepository.GetAll(new PersonSpecification(request).ToExpression());

            return(await PagedList <PersonModel> .Create(_unitOfWork.PersonRepository, data, request.PageNumber, request.PageSize, _mapper, cancellationToken));
        }