Пример #1
0
        public GetCargosOutputDTO GetCargos(GetCargosInputDTO dto)
        {
            SearchParameters parameters = this.getCargosInputMapper.Map(dto);
            IEnumerable <Tuple <Cargo, double> > cargosWithDistance = this.cargoService.GetCargos(parameters);

            return(this.getCargosOutputMapper.MapFrom(cargosWithDistance));
        }
        public SearchParameters Map(GetCargosInputDTO dto)
        {
            if (dto == null)
            {
                throw new ArgumentNullException("dto");
            }

            return(this.mapper.Map <SearchParameters>(dto));
        }
Пример #3
0
 public IHttpActionResult SearchCargos([FromBody] GetCargosInputDTO dto)
 {
     return(Ok(cargoService.GetCargos(dto)));
 }
Пример #4
0
 public IHttpActionResult GetCargos([FromUri] GetCargosInputDTO dto)
 {
     return(Ok(cargoService.GetCargos(dto)));
 }