public bool book(BookingsData data) { bool addSuccess = false; Flights flights = new Flights(); Hotels hotels = new Hotels(); using (TransactionScope transaction = new TransactionScope()) { try { flights.add(data); hotels.add(data); addSuccess = true; transaction.Complete(); } catch (Exception e) { Console.WriteLine("Error when BookingManager.book " + e); //throw e; } } return(addSuccess); }