public DashBoardBLL() { BookingRepository = new BookingRepository(); CruiseRepository = new CruiseRepository(); RoomClassRepository = new RoomClassRepository(); RoomTypeRepository = new RoomTypeRepository(); SailsModule = SailsModule.GetInstance(); ActivityRepository = new ActivityRepository(); AgencyRepository = new AgencyRepository(); AgencyContactRepository = new AgencyContactRepository(); CustomerRepository = new CustomerRepository(); GoldenDayRepository = new GoldenDayRepository(); }
public void Dispose() { if (BookingRepository != null) { BookingRepository.Dispose(); BookingRepository = null; } if (CruiseRepository != null) { CruiseRepository.Dispose(); CruiseRepository = null; } if (RoomClassRepository != null) { RoomClassRepository.Dispose(); RoomClassRepository = null; } if (RoomTypeRepository != null) { RoomTypeRepository.Dispose(); RoomTypeRepository = null; } if (ActivityRepository != null) { ActivityRepository.Dispose(); ActivityRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (CustomerRepository != null) { CustomerRepository.Dispose(); CustomerRepository = null; } if (GoldenDayRepository != null) { GoldenDayRepository.Dispose(); GoldenDayRepository = null; } }