Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && dueDateReasonRepository != null)
     {
         dueDateReasonRepository.Dispose();
         dueDateReasonRepository = null;
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
 public ProductQuoteController(IProductQuoteRepository productQuoteRepo,
                               ICustomerRepository customerRepo,
                               ICustomerProductRepository customerProductRepo,
                               IProductQuoteService productQuoteServ,
                               IDueDateReasonRepository dueDateReasonRepo,
                               IGenericRepository <ReasonsForClosure> reasonsForClosureRepo)
 {
     productQuoteRepository      = productQuoteRepo;
     customerRepository          = customerRepo;
     customerProductRepository   = customerProductRepo;
     productQuoteService         = productQuoteServ;
     dueDateReasonRepository     = dueDateReasonRepo;
     reasonsForClosureRepository = reasonsForClosureRepo;
     userManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(new ApplicationDbContext()));
 }
Exemplo n.º 3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (productQuoteRepository != null)
         {
             productQuoteRepository.Dispose();
             productQuoteRepository = null;
         }
         if (customerRepository != null)
         {
             customerRepository.Dispose();
             customerRepository = null;
         }
         if (userManager != null)
         {
             userManager.Dispose();
             userManager = null;
         }
         if (customerProductRepository != null)
         {
             customerProductRepository.Dispose();
             customerProductRepository = null;
         }
         if (productQuoteService != null)
         {
             productQuoteService.Dispose();
             productQuoteService = null;
         }
         if (dueDateReasonRepository != null)
         {
             dueDateReasonRepository.Dispose();
             dueDateReasonRepository = null;
         }
         if (reasonsForClosureRepository != null)
         {
             reasonsForClosureRepository.Dispose();
             reasonsForClosureRepository = null;
         }
     }
     base.Dispose(disposing);
 }
Exemplo n.º 4
0
 public DueDateReasonController(IDueDateReasonRepository dueDateReasonRepo)
 {
     dueDateReasonRepository = dueDateReasonRepo;
 }