/// <summary> /// Initializes a new instance of the <see cref="CustomerRepository"/> class. /// </summary> /// <param name="work"> /// The database unit of work /// </param> /// <param name="cache"> /// The cache. /// </param> /// <param name="customerAddressRepository"> /// The customer Address Repository. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="sqlSyntax"> /// The SQL Syntax. /// </param> public CustomerRepository(IDatabaseUnitOfWork work, IRuntimeCacheProvider cache, ICustomerAddressRepository customerAddressRepository, ILogger logger, ISqlSyntaxProvider sqlSyntax) : base(work, cache, logger, sqlSyntax) { Mandate.ParameterNotNull(customerAddressRepository, "customerAddressRepository"); _customerAddressRepository = customerAddressRepository; }
/// <summary> /// Initializes a new instance of the <see cref="CustomerRepository"/> class. /// </summary> /// <param name="work"> /// The database unit of work /// </param> /// <param name="cache"> /// The cache. /// </param> /// <param name="customerAddressRepository"> /// The customer Address Repository. /// </param> public CustomerRepository(IDatabaseUnitOfWork work, IRuntimeCacheProvider cache, ICustomerAddressRepository customerAddressRepository) : base(work, cache) { Mandate.ParameterNotNull(customerAddressRepository, "customerAddressRepository"); _customerAddressRepository = customerAddressRepository; }
/// <summary> /// Constructor. /// You can use a dependency injection container to initialize the services and repositories. /// </summary> public CheckoutController() { shoppingService = new ShoppingService(); pricingService = new PricingService(); paymentRepository = new KenticoPaymentMethodRepository(); addressRepository = new KenticoCustomerAddressRepository(); shippingOptionRepository = new KenticoShippingOptionRepository(); }
public CustomerService(ICustomerRepository customerRepository, ICustomerAddressRepository customerAddressRepository, IMapper mapper) { _customerRepository = customerRepository; _customerAddressRepository = customerAddressRepository; _mapper = mapper; }
/// <summary> /// Constructor. /// </summary> /// <param name="shoppingService">Shopping service</param> /// <param name="addressRepository">Address repository</param> /// <param name="paymentMethodRepository">Payment method repository</param> /// <param name="shippingOptionRepository">Shipping option repository</param> /// <param name="countryRepository">Country repository</param> public CheckoutService(IShoppingService shoppingService, ICustomerAddressRepository addressRepository, IPaymentMethodRepository paymentMethodRepository, IShippingOptionRepository shippingOptionRepository, ICountryRepository countryRepository) { mShoppingService = shoppingService; mPaymentMethodRepository = paymentMethodRepository; mShippingOptionRepository = shippingOptionRepository; mCountryRepository = countryRepository; mAddressRepository = addressRepository; }
public CustomerService( IUnitOfWork unitOfWork, ICustomerRepository customerRepository, ICustomerAddressRepository customerAddressRepository, IAddressRepository addressRepository) { this._unitOfWork = unitOfWork; this._customerRepository = customerRepository; this._customerAddressRepository = customerAddressRepository; this._addressRepository = addressRepository; }
public UnitOfWork(ApplicationDbContext db) { _db = db; ProductOptionRepository = new ProductOptionRepository(_db); OrderDetailOptionRepository = new OrderDetailOptionRepository(_db); OrderDetailRepository = new OrderDetailRepository(_db); OrderRepository = new OrderRepository(_db); ProductRepository = new ProductRepository(_db); CustomerRepository = new CustomerRepository(_db); CustomerAddressRepository = new CustomerAddressRepository(_db); }
public CustomerAddressViewService( IViewModelMapper viewModelMapper, ICustomerRepository customerRepository, ICustomerAddressRepository customerAddressRepository, IAddressRepository addressRepository, IMyAccountUrlProvider myAccountUrlProvider, ICountryService countryService, IComposerContext composerContext, IRecurringOrderCartsViewService recurringOrderCartsViewService) { if (viewModelMapper == null) { throw new ArgumentNullException("viewModelMapper"); } if (customerRepository == null) { throw new ArgumentNullException("customerRepository"); } if (customerAddressRepository == null) { throw new ArgumentNullException("customerAddressRepository"); } if (addressRepository == null) { throw new ArgumentNullException("addressRepository"); } if (myAccountUrlProvider == null) { throw new ArgumentNullException("myAccountUrlProvider"); } if (countryService == null) { throw new ArgumentNullException("countryService"); } if (composerContext == null) { throw new ArgumentNullException("composerContext"); } if (recurringOrderCartsViewService == null) { throw new ArgumentNullException("recurringOrderCartsViewService"); } ViewModelMapper = viewModelMapper; CustomerRepository = customerRepository; CustomerAddressRepository = customerAddressRepository; AddressRepository = addressRepository; MyAccountUrlProvider = myAccountUrlProvider; CountryService = countryService; ComposerContext = composerContext; RecurringOrderCartsViewService = recurringOrderCartsViewService; }
public AppointmentController(IAppointmentRepository appointmentRepository, ICustomerRepository customerRepository, ICleanerRepository cleanerRepository, IServicePriceRepository servicePriceRepository, ICustomerSubscriptionRepository customerSubscriptionRepository, ICustomerAddressRepository customerAddressRepository) { this.appointmentRepository = appointmentRepository; this.customerRepository = customerRepository; this.cleanerRepository = cleanerRepository; this.servicePriceRepository = servicePriceRepository; this.customerSubscriptionRepository = customerSubscriptionRepository; this.customerAddressRepository = customerAddressRepository; }
/// <summary> /// Initializes a new instance of the <see cref="CustomerRepository"/> class. /// </summary> /// <param name="work"> /// The database unit of work /// </param> /// <param name="customerAddressRepository"> /// The customer Address Repository. /// </param> /// <param name="noteRepository"> /// The note Repository. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="sqlSyntax"> /// The SQL Syntax. /// </param> public CustomerRepository( IDatabaseUnitOfWork work, ICustomerAddressRepository customerAddressRepository, INoteRepository noteRepository, ILogger logger, ISqlSyntaxProvider sqlSyntax) : base(work, logger, sqlSyntax) { Mandate.ParameterNotNull(customerAddressRepository, "customerAddressRepository"); Mandate.ParameterNotNull(noteRepository, "noteRepository"); _noteRepository = noteRepository; _customerAddressRepository = customerAddressRepository; }
public CustomerAddressAppService( ICustomerAddressRepository customerAddressRepository, IAddressRepository addressRepository, ICountryRepository countryRepository, IStateOrProvinceRepository stateOrProvinceRepository, IDistrictRepository districtRepository, ICustomerLookupService customerLookupService) { _customerAddressRepository = customerAddressRepository; _addressRepository = addressRepository; _countryRepository = countryRepository; _stateOrProvinceRepository = stateOrProvinceRepository; _districtRepository = districtRepository; _customerLookupService = customerLookupService; }
public SalesService( IUnitOfWork unitOfWork, IProductRepository productsRepository, ISalesOrderHeaderRepository salesOrderHeaderRepository, ISalesOrderDetailRepository salesOrderDetailRepository, ICustomerAddressRepository customerAddressRepository, IAddressRepository addressRepository, ICustomerRepository customerRepository) { this._unitOfWork = unitOfWork; this._productsRepository = productsRepository; this._salesOrderHeaderRepository = salesOrderHeaderRepository; this._salesOrderDetailRepository = salesOrderDetailRepository; this._customerAddressRepository = customerAddressRepository; this._addressRepository = addressRepository; this._customerRepository = customerRepository; }
public CustomerAddressViewService( IViewModelMapper viewModelMapper, ICustomerRepository customerRepository, ICustomerAddressRepository customerAddressRepository, IAddressRepository addressRepository, IMyAccountUrlProvider myAccountUrlProvider, ICountryService countryService, IComposerContext composerContext, IRecurringOrderCartsViewService recurringOrderCartsViewService) { ViewModelMapper = viewModelMapper ?? throw new ArgumentNullException(nameof(viewModelMapper)); CustomerRepository = customerRepository ?? throw new ArgumentNullException(nameof(customerRepository)); CustomerAddressRepository = customerAddressRepository ?? throw new ArgumentNullException(nameof(customerAddressRepository)); AddressRepository = addressRepository ?? throw new ArgumentNullException(nameof(addressRepository)); MyAccountUrlProvider = myAccountUrlProvider ?? throw new ArgumentNullException(nameof(myAccountUrlProvider)); CountryService = countryService ?? throw new ArgumentNullException(nameof(countryService)); ComposerContext = composerContext ?? throw new ArgumentNullException(nameof(composerContext)); RecurringOrderCartsViewService = recurringOrderCartsViewService ?? throw new ArgumentNullException(nameof(recurringOrderCartsViewService)); }
/// <summary> /// 构造函数 /// </summary> public SaleOrderService() { this.saleOrderRepository = new SaleOrderRepository(); this.customerAddressRepository = new CustomerAddressRepository(); }
public CustomerAddressController(ICustomerAddressRepository CustomerAddressRepo) { _CustomerAddressRepo = CustomerAddressRepo; }
/// <summary> /// 构造函数 /// </summary> public CustomerAddressService() { this.customerAddressRepository = new CustomerAddressRepository(); }
public CustomerAddressController(ICustomerAddressRepository repository) { service = repository; }
/// <summary> /// 构造函数 /// </summary> public CustomerService() { this.customerGroupRepository = new CustomerGroupRepository(); this.customerAddressRepository = new CustomerAddressRepository(); this.customerRepository = new CustomerRepository(); }