public NewProductEventProcessor( ILogger <NewProductEventProcessor> logger, IEventSubscriber eventSubscriber, IProductManagementRepository productRepository ) { this.logger = logger; this.subscriber = eventSubscriber; this.subscriber.ProductAddedEventReceived += (prd) => { if (prd?.Product != null) { productRepository.AddProduct(prd.Product); } else if (prd?.Catagory != null) { productRepository.AddCatagory(prd.Catagory); } //productRepository.Add(new Product() //{ // ProductName = prd.Name, // ProductId = prd.ProductId, // Catagory = prd.Category //}); }; }
public ProductController( ILogger <ProductController> logger, IProductManagementRepository prodRepo ) : base() { _logger = logger; _prodRepo = prodRepo; }
public ProductManagementService( AppSetting appSetting, IProductManagementRepository productManagementRepository) { this._appSetting = appSetting; this._productManagementRepository = productManagementRepository; }
public ProductManagementService(IProductManagementRepository dal) { _dal = dal; base.BaseDal = dal; }
public ProductController( IProductManagementRepository productRepository) { this.productRepository = productRepository; }