Exemple #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));
        }
 public IHttpActionResult SearchCargos([FromBody] GetCargosInputDTO dto)
 {
     return(Ok(cargoService.GetCargos(dto)));
 }
 public IHttpActionResult GetCargos([FromUri] GetCargosInputDTO dto)
 {
     return(Ok(cargoService.GetCargos(dto)));
 }