public async Task <PagedList <RelationshipTypeModel> > Handle(GetRelationshipTypesQuery query, CancellationToken cancellationToken) { var contactTypes = _unitOfWork.PersonsRelationshipTypeRepository.GetAll(new RelationshipTypeSpecification(query).ToExpression()); var pagedList = await PagedList <PersonsRelationshipType> .Create(_unitOfWork.PersonsRelationshipTypeRepository, contactTypes, query.PageNumber, query.PageSize, _mapper, cancellationToken); return(_mapper.Map <PagedList <RelationshipTypeModel> >(pagedList)); }
public RelationshipTypeSpecification(GetRelationshipTypesQuery filter) { _filter = filter; }