public CustomerController(ICustomerService customerServ, ICreditRatingRepository creditRatingRepo, IWorkflowMessageService workflowMessageServ, ICustomerProductRepository customerProductRepo, IContactRepository contactRepo, IContactTypeRepository contactTypeRepo, IGenericRepository <ContactClass> contactClassRepo, ISalesChannelRepository salesChannelRepo, ISalesChannelUserRepository salesChannelUserRepo) { customerService = customerServ; creditRatingRepository = creditRatingRepo; workflowMessageService = workflowMessageServ; customerProductRepository = customerProductRepo; contactRepository = contactRepo; contactTypeRepository = contactTypeRepo; contactClassRepository = contactClassRepo; salesChannelRepository = salesChannelRepo; salesChannelUserRepository = salesChannelUserRepo; userManager = new UserManager <CustomerUser>(new UserStore <CustomerUser>(new ApplicationDbContext())); userManager.UserValidator = new UserValidator <CustomerUser>(userManager) { //AllowOnlyAlphanumericUserNames = true, RequireUniqueEmail = true }; }
protected override void Dispose(bool disposing) { if (disposing && creditRatingRepository != null) { creditRatingRepository.Dispose(); creditRatingRepository = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (contactTypeRepository != null) { contactTypeRepository.Dispose(); contactTypeRepository = null; } if (contactRepository != null) { contactRepository.Dispose(); contactRepository = null; } if (customerService != null) { customerService.Dispose(); customerService = null; } if (creditRatingRepository != null) { creditRatingRepository.Dispose(); creditRatingRepository = null; } if (userManager != null) { userManager.Dispose(); userManager = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } if (customerProductRepository != null) { customerProductRepository.Dispose(); customerProductRepository = null; } if (contactClassRepository != null) { contactClassRepository.Dispose(); contactClassRepository = null; } if (salesChannelRepository != null) { salesChannelRepository.Dispose(); salesChannelRepository = null; } if (salesChannelUserRepository != null) { salesChannelUserRepository.Dispose(); salesChannelUserRepository = null; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (creditRatingRepository != null) { creditRatingRepository.Dispose(); creditRatingRepository = null; } if (creditRatingPaymentDeadlineRepository != null) { creditRatingPaymentDeadlineRepository.Dispose(); creditRatingPaymentDeadlineRepository = null; } } base.Dispose(disposing); }
public CreditRatingPaymentDeadlineApiController(ICreditRatingRepository creditRatingRepo, ICreditRatingPaymentDeadlineRepository creditRatingPaymentDeadlineRepo) { creditRatingRepository = creditRatingRepo; creditRatingPaymentDeadlineRepository = creditRatingPaymentDeadlineRepo; }
public CreditRatingController(ICreditRatingRepository creditRatingRepo) { creditRatingRepository = creditRatingRepo; }