예제 #1
0
        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));
        }
예제 #2
0
 public RelationshipTypeSpecification(GetRelationshipTypesQuery filter)
 {
     _filter = filter;
 }