コード例 #1
0
        /// <summary>
        /// This Method will Delete Existing Passenger
        /// </summary>
        /// <param name="passengerId">it accept passenger id</param>
        /// <returns>i will return teturn true if passenger deleted </returns>
        public bool DeletePassenger(long passengerId)
        {
            Passengers _passenger = _passengerRepository.FindBy(m => m.Id == passengerId).FirstOrDefault();

            if (_passenger != null)
            {
                _passengerRepository.DeleteWhere(m => m.Id == passengerId);
                _passengerRepository.Commit();
                return(true);
            }
            else
            {
                return(false);
            }
        }