Example #1
0
        ///// <summary>
        ///// Method delete the existing customer account
        ///// </summary>
        ///// <param name="id"></param>
        ///// <returns></returns>
        public bool DeleteCancellationById(int id)
        {
            using (AirlineDBEntities db = new AirlineDBEntities())
            {
                Cancellation cancellation = db.Cancellations.Find(id);
                db.Configuration.LazyLoadingEnabled = false;
                if (cancellation == null)
                {
                    return(false);;
                }

                db.usp_DeleteCancelledTicketById(id);
                db.SaveChanges();

                return(true);
            }
        }