Example #1
0
        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));
            }
        }
Example #2
0
 public void DeletePassenger(Passenger passenger)
 {
     _passenger.DeletePassenger(passenger);
 }