public BasketsController( IBasketsRepository basketsRepository, IDiscountsRepository discountsRepository) { _basketsRepository = basketsRepository; _discountsRepository = discountsRepository; }
public CreateDiscountHandler(IDiscountsRepository discountsRepository, ICustomersRepository customersRepository, IBusPublisher busPublisher, ILogger <CreateDiscountHandler> logger) { _discountsRepository = discountsRepository; _customersRepository = customersRepository; _busPublisher = busPublisher; _logger = logger; }
public TransactionsFacade( IUsersRepository usersRepository, IProductsRepository productsRepository, IDiscountsRepository discountRepository, IEnvironment environment, ILockService lockService, ITransactionErrorsRepository errorsRepository, ITransactionsRepository transactionsRepository ) { this.usersRepository = usersRepository; this.productsRepository = productsRepository; this.discountRepository = discountRepository; this.environment = environment; this.lockService = lockService; this.errorsRepository = errorsRepository; this.transactionsRepository = transactionsRepository; }
// Using dependency injection to inject the repositories to the service. public CheckoutService(ICheckoutRepository checkoutRepo, IProductsRepository productsRepo, IDiscountsRepository discountsRepo) { _checkoutRepo = checkoutRepo; _productsRepo = productsRepo; _discountsRepo = discountsRepo; }
public DiscountsRepositoryTests() { var resolver = new XmlPathResolver(); repository = new DiscountsRepository(resolver); }
public DiscountService(IDiscountsRepository discountsRepository) { _discountsRepository = discountsRepository; }
public CreateDiscountHandler(IDiscountsRepository discountsRepository) { _discountsRepository = discountsRepository; }