public CustomerAuditorsController(ICustomerAuditorRespository customerAuditorRepo, IWorkflowMessageService workflowMessageServ) { customerAuditorRepository = customerAuditorRepo; workflowMessageService = workflowMessageServ; userManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(new ApplicationDbContext())); }
public CustomerAdminAuditorsController(ICustomerAuditorRespository customerAuditorRepo, ICustomerRepository customerRepo, IWorkflowMessageService workflowMessageServ, IIdentityMessageService emailServ) { customerAuditorRepository = customerAuditorRepo; customerRepository = customerRepo; workflowMessageService = workflowMessageServ; emailService = emailServ; userManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(new ApplicationDbContext())); userManager.UserValidator = new UserValidator <ApplicationUser>(userManager) { AllowOnlyAlphanumericUserNames = true, RequireUniqueEmail = true }; var provider = new DpapiDataProtectionProvider("SampleAppName"); userManager.UserTokenProvider = new DataProtectorTokenProvider <ApplicationUser>(provider.Create("SampleTokenName")); userManager.EmailService = emailService; }
public RequirementsController(IRequirementRepository requirementRepo, IPresentationRepository presentationRepo, IDocumentFileService documentFileServ, ICustomerAuditorRespository customerAuditorRespo, IContractorRepository contractorRepo, IPresentationServices presentationServ, IWorkflowMessageService workflowMessageServ, IDocumentationBusinessTypeRepository documentationBusinessTypeRepo, IPeriodRepository periodRepo, IEntityTypeRepository entityTypeRepo) { requirementRepository = requirementRepo; presentationRepository = presentationRepo; documentFileService = documentFileServ; customerAuditorRespository = customerAuditorRespo; contractorRepository = contractorRepo; presentationServices = presentationServ; workflowMessageService = workflowMessageServ; documentationBusinessTypeRepository = documentationBusinessTypeRepo; periodRepository = periodRepo; entityTypeRepository = entityTypeRepo; }
protected override void Dispose(bool disposing) { if (disposing) { if (customerAuditorRepository != null) { customerAuditorRepository.Dispose(); customerAuditorRepository = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } if (userManager != null) { userManager.Dispose(); userManager = null; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (presentationRepository != null) { presentationRepository.Dispose(); presentationRepository = null; } //documentFileService.Dispose(); if (requirementRepository != null) { requirementRepository.Dispose(); requirementRepository = null; } if (customerAuditorRespository != null) { customerAuditorRespository.Dispose(); customerAuditorRespository = null; } if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (presentationServices != null) { presentationServices.Dispose(); presentationServices = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } if (documentationBusinessTypeRepository != null) { documentationBusinessTypeRepository.Dispose(); documentationBusinessTypeRepository = null; } if (periodRepository != null) { periodRepository.Dispose(); periodRepository = null; } if (entityTypeRepository != null) { entityTypeRepository.Dispose(); entityTypeRepository = null; } } base.Dispose(disposing); }