protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         expenseRepository.Dispose();
     }
     base.Dispose(disposing);
 }
 public void Dispose()
 {
     if (ExpenseRepository != null)
     {
         ExpenseRepository.Dispose();
         ExpenseRepository = null;
     }
     if (ExpenseHistoryRepository != null)
     {
         ExpenseHistoryRepository.Dispose();
         ExpenseHistoryRepository = null;
     }
     if (AgencyRepository != null)
     {
         AgencyRepository.Dispose();
         AgencyRepository = null;
     }
 }
 public void Dispose()
 {
     if (RouteRepository != null)
     {
         RouteRepository.Dispose();
         RouteRepository = null;
     }
     if (BusTypeRepository != null)
     {
         BusTypeRepository.Dispose();
         BusTypeRepository = null;
     }
     if (AgencyRepository != null)
     {
         AgencyRepository.Dispose();
         AgencyRepository = null;
     }
     if (RoleRepository != null)
     {
         RoleRepository.Dispose();
         RoleRepository = null;
     }
     if (BookingRepository != null)
     {
         BookingRepository.Dispose();
         BookingRepository = null;
     }
     if (BusByDateRepository != null)
     {
         BusByDateRepository.Dispose();
         BusByDateRepository = null;
     }
     if (BookingBusByDateRepository != null)
     {
         BookingBusByDateRepository.Dispose();
         BookingBusByDateRepository = null;
     }
     if (LockingTransferRepository != null)
     {
         LockingTransferRepository.Dispose();
         LockingTransferRepository = null;
     }
     if (ExpenseRepository != null)
     {
         ExpenseRepository.Dispose();
         ExpenseRepository = null;
     }
     if (ExpenseServiceRepository != null)
     {
         ExpenseServiceRepository.Dispose();
         ExpenseServiceRepository = null;
     }
     if (CostTypeRepository != null)
     {
         CostTypeRepository.Dispose();
         CostTypeRepository = null;
     }
     if (GuideRepository != null)
     {
         GuideRepository.Dispose();
         GuideRepository = null;
     }
 }
Esempio n. 4
0
 public void Dispose()
 {
     if (BookingRepository != null)
     {
         BookingRepository.Dispose();
         BookingRepository = null;
     }
     if (CruiseRepository != null)
     {
         CruiseRepository.Dispose();
         CruiseRepository = null;
     }
     if (ExpenseRepository != null)
     {
         ExpenseRepository.Dispose();
         ExpenseRepository = null;
     }
     if (AgencyRepository != null)
     {
         AgencyRepository.Dispose();
         AgencyRepository = null;
     }
     if (UserRepository != null)
     {
         UserRepository.Dispose();
         UserRepository = null;
     }
     if (ExpenseHistoryRepository != null)
     {
         ExpenseHistoryRepository.Dispose();
         ExpenseHistoryRepository = null;
     }
     if (CostTypeRepository != null)
     {
         CostTypeRepository.Dispose();
         CostTypeRepository = null;
     }
     if (ExpenseServiceRepository != null)
     {
         ExpenseServiceRepository.Dispose();
         ExpenseServiceRepository = null;
     }
     if (LockingExpenseRepository != null)
     {
         LockingExpenseRepository.Dispose();
         LockingExpenseRepository = null;
     }
     if (BookingHistoryRepository != null)
     {
         BookingHistoryRepository.Dispose();
         BookingHistoryRepository = null;
     }
     if (BookingRoomRepository != null)
     {
         BookingRoomRepository.Dispose();
         BookingRoomRepository = null;
     }
     if (CustomerRepository != null)
     {
         CustomerRepository.Dispose();
         CustomerRepository = null;
     }
     if (AgencyNotesRepository != null)
     {
         AgencyNotesRepository.Dispose();
         AgencyNotesRepository = null;
     }
 }