コード例 #1
0
ファイル: CustomerController.cs プロジェクト: smauhourat/pq
        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
            };
        }
コード例 #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && creditRatingRepository != null)
     {
         creditRatingRepository.Dispose();
         creditRatingRepository = null;
     }
     base.Dispose(disposing);
 }
コード例 #3
0
ファイル: CustomerController.cs プロジェクト: smauhourat/pq
 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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 public CreditRatingPaymentDeadlineApiController(ICreditRatingRepository creditRatingRepo,
                                                 ICreditRatingPaymentDeadlineRepository creditRatingPaymentDeadlineRepo)
 {
     creditRatingRepository = creditRatingRepo;
     creditRatingPaymentDeadlineRepository = creditRatingPaymentDeadlineRepo;
 }
コード例 #6
0
 public CreditRatingController(ICreditRatingRepository creditRatingRepo)
 {
     creditRatingRepository = creditRatingRepo;
 }