public IActionResult DeletePassenger([FromRoute] int passengerId) { var response = new DeletePassengerResponse(); try { response = _passengerService.DeletePassenger(new DeletePassengerRequest { PassengerId = passengerId }); } catch (Exception ex) { return(BadRequest(ex.ToString())); } if (response.IsSuccessful) { return(Ok(response.Message)); } else { return(BadRequest(response.Message)); } }
public void DeletePassenger(Passenger passenger) { _passenger.DeletePassenger(passenger); }