Esempio n. 1
0
        /// <summary>
        /// This Method will Update Existing Passenger
        /// </summary>
        /// <param name="req">req is an object type of Passenger class</param>
        /// <returns>this will return Passengers object</returns>
        public Passengers UpdatePassenger(Passenger req)
        {
            Passengers _passenger = _passengerRepository.FindBy(m => m.Id == req.passengerId).FirstOrDefault();

            _passenger.name    = req.name;
            _passenger.bDay    = req.bDay;
            _passenger.bMonth  = req.bMonth;
            _passenger.bYear   = req.bYear;
            _passenger.sex     = req.sex;
            _passenger.birthPf = req.birthPreferance;
            _passenger.foodPf  = req.foodPreferance;
            _passenger.senior  = req.senior;
            _passengerRepository.Update(_passenger);
            _passengerRepository.Commit();
            return(_passenger);
        }