public async Task <PagedList <ContactTypeModel> > Handle(GetContactTypesQuery query, CancellationToken cancellationToken)
        {
            var contactTypes = _unitOfWork.PersonContactTypeRepository.GetAll(new ContactTypeSpecification(query).ToExpression());
            var pagedList    = await PagedList <PersonContactType> .Create(_unitOfWork.PersonContactTypeRepository, contactTypes, query.PageNumber, query.PageSize, _mapper, cancellationToken);

            return(_mapper.Map <PagedList <ContactTypeModel> >(pagedList));
        }
 public ContactTypeSpecification(GetContactTypesQuery filter)
 {
     _filter = filter;
 }