/// <summary> add a new passenger in the db
        /// </summary>
        public static void Add(PassngerDTO passenger)
        {
            UserDTO user = UserBL.Add(passenger);

            passenger.Identity = user.Identity;
            PassengerDal.AddPassenger(PassengerConverters.GetPassenger(passenger));
        }
 public IHttpActionResult Post([FromBody] PassngerDTO passenger)
 {
     try
     {
         PassengerBL.Add(passenger);
         return(Ok());
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
        public static PassngerDTO GetPassengerDTO(Passenger passenger)
        {
            if (passenger == null)
            {
                return(null);
            }
            User user = UserConverters.GetUser(UserBL.GetUser(passenger.Identity));

            passenger.User = user;
            PassngerDTO passengerDTO = new PassngerDTO()
            {
                Id       = passenger.Id,
                Identity = passenger.Identity,
                Name     = passenger.User.Name,
                Mail     = passenger.User.Mail,
                Gender   = passenger.User.Gender,
            };

            return(passengerDTO);
        }