Esempio n. 1
0
        public async Task <IEnumerable <PropertyResponse> > Handle(GetAllPropertiesQuery request, CancellationToken cancellationToken)
        {
            var filter     = _mapper.Map <GetAllPropertiesFilter>(request.PropertiesRequestQueryString);
            var properties = await _propertiesService.GetAllPropertiesAsync(filter);

            return(_mapper.Map <IEnumerable <PropertyResponse> >(properties));
        }
Esempio n. 2
0
 public PropertiesQuery(
     IPropertiesService propertiesService)
 {
     FieldAsync <ListGraphType <PropertyType> >(
         "Properties",
         resolve: async context => await propertiesService.GetAllPropertiesAsync());
 }