public IActionResult GetCost(ShowResultDTO showResultDTO) { var result = this.showResultService.PresentResult(showResultDTO.CityName, showResultDTO.ModuleListDTO); if (result.Cost == -1) { return(StatusCode(417, "Error, propably bad module name")); } return(Ok(this.showResultService.PresentResult(showResultDTO.CityName, showResultDTO.ModuleListDTO))); }
public IHttpActionResult GetCost(ShowResultDTO showResultDTO) { var result = this.showResultService.PresentResult(showResultDTO.CityName, showResultDTO.ModuleListDTO); if (result.Cost == -1) { return(Content <string>(HttpStatusCode.ExpectationFailed, "Error, probably bad module name")); } return(Content <ResultCostDTO>(HttpStatusCode.OK, this.showResultService.PresentResult(showResultDTO.CityName, showResultDTO.ModuleListDTO))); }