protected override void Dispose(bool disposing) { if (disposing && dueDateReasonRepository != null) { dueDateReasonRepository.Dispose(); dueDateReasonRepository = null; } base.Dispose(disposing); }
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())); }
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); }
public DueDateReasonController(IDueDateReasonRepository dueDateReasonRepo) { dueDateReasonRepository = dueDateReasonRepo; }