public void Setup() { var configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: true) .AddUserSecrets("ccd05d39-4c3d-42e9-ac50-87bb97e1d73b") .Build(); _sellRepository = new SellRepository( new DataStoreConfiguration( configuration["CosmosEndpoint"], configuration["CosmosPrimaryKey"])); _storeRepository = new StoreRepository( new DataStoreConfiguration( configuration["CosmosEndpoint"], configuration["CosmosPrimaryKey"])); _statusSellRepository = new StatusSellRepository( new DataStoreConfiguration( configuration["CosmosEndpoint"], configuration["CosmosPrimaryKey"])); _productRepository = new ProductRepository( new DataStoreConfiguration( configuration["CosmosEndpoint"], configuration["CosmosPrimaryKey"])); }
//private readonly CC.EventBus.EventBus.IEventBus _eventBus; //public SellBusiness(ISellRepository sellRepository, // IStatusSellRepository statusSellRepository, // IProductRepository productRepository, CC.EventBus.EventBus.IEventBus eventBus) public SellBusiness(ISellRepository sellRepository, IStatusSellRepository statusSellRepository, IProductRepository productRepository) { _sellRepository = sellRepository; _statusSellRepository = statusSellRepository; _productRepository = productRepository; //_eventBus = eventBus; }
//Depedency injection public MainHub(UserManager <ApplicationUser> userManager, ICartRepository cartRepository, IOrderRepository orderRepository, IProductRepository productRepository, IWalletRepository walletRepository, IAskRepository askRepository, IOfferRepository offerRepository, ISellRepository sellRepository ) { _userManager = userManager; _cartRepository = cartRepository; _orderRepository = orderRepository; _productRepository = productRepository; _walletRepository = walletRepository; _askRepository = askRepository; _offerRepository = offerRepository; _sellRepository = sellRepository; }
public Sell(ISellRepository sellRepository, IStatusSellRepository statusSellRepository, IProductRepository productRepository) { _sellRepository = sellRepository; _statusSellRepository = statusSellRepository; _productRepository = productRepository; }
public SellService(ISellRepository sellRepository) { _sellRepository = sellRepository ?? throw new ArgumentNullException(nameof(sellRepository));; }
public SellManager(ISellRepository sellRepository) : base(sellRepository) { this.sellRepository = sellRepository; }