public ProductsController(ILogger <ProductsController> logger, IProductService productService, IProductPictureService productPictureService, ICategoryService categoryService) { _logger = logger; _productService = productService; _productPictureService = productPictureService; _categoryService = categoryService; }
public ProductsController(IProductService productService, IProductTypeService productTypeService, IDataTypeService dataTypeService, ICategoryService categoryService, IProductPictureService productPictureService, IProductPropertyValueService productPropertyValueService) { _productService = productService; _productTypeService = productTypeService; _productPictureService = productPictureService; _dataTypeService = dataTypeService; _categoryService = categoryService; _productPropertyValueService = productPropertyValueService; }
public Product(IProductService productService, IBrandService brandService, IMainCategoryService maincategoryService, ISubCategoryService subcategoryService, IProductPictureService productPictureService, IBasketService basketService, IAppUserService userService) { _productService = productService; _brandService = brandService; _maincategoryService = maincategoryService; _subcategoryService = subcategoryService; _productPictureService = productPictureService; _basketService = basketService; _userService = userService; }
public WebHookEventConsumer(IStoreService storeService) { _customerApiService = EngineContext.Current.Resolve <ICustomerApiService>(); _categoryApiService = EngineContext.Current.Resolve <ICategoryApiService>(); _productApiService = EngineContext.Current.Resolve <IProductApiService>(); _dtoHelper = EngineContext.Current.Resolve <IDTOHelper>(); _productPictureService = EngineContext.Current.Resolve <IProductPictureService>(); _productService = EngineContext.Current.Resolve <IProductService>(); _categoryService = EngineContext.Current.Resolve <ICategoryService>(); _storeMappingService = EngineContext.Current.Resolve <IStoreMappingService>(); _cacheManager = EngineContext.Current.Resolve <IStaticCacheManager>(); }
public ProductController( IProductService productService, IProductPictureService pictureService, IOptions <ProductPictureOptions> _pictureOptionsAccessor, IOperationService operationService, ILoggerFactory loggerFactory ) { _productService = productService; _pictureService = pictureService; _pictureOptions = _pictureOptionsAccessor.Value; _operationService = operationService; _logger = loggerFactory.CreateLogger <ProductController>(); }
public void Update(ProductDto item, string virtualPath, string physicalPath, ICollection <PictureTransfer> pictureTransfers) { InitProductPicture(item, virtualPath, pictureTransfers); Unit = new UnitOfWork(this); Repository.Update(item, false); IProductPictureService pictureService = GetService <IProductPictureService>(); int counter = 0; foreach (var pic in pictureTransfers) { switch (pic.State) { case PictureTransfer.States.Added: { pictureService.Insert(item.ProductPictures.ElementAt(counter)); break; } case PictureTransfer.States.Updated: { pictureService.Update(item.ProductPictures.ElementAt(counter)); break; } case PictureTransfer.States.Deleted: { pictureService.Delete(item.ProductPictures.ElementAt(counter)); break; } } counter++; } StorePictures(item, physicalPath, pictureTransfers); Unit.Save(); }
public WebHookEventConsumer(IStoreService storeService) { IWebHookService webHookService = EngineContext.Current.ContainerManager.Resolve <IWebHookService>(); _customerApiService = EngineContext.Current.ContainerManager.Resolve <ICustomerApiService>(); _categoryApiService = EngineContext.Current.ContainerManager.Resolve <ICategoryApiService>(); _productApiService = EngineContext.Current.ContainerManager.Resolve <IProductApiService>(); _dtoHelper = EngineContext.Current.ContainerManager.Resolve <IDTOHelper>(); _storeService = EngineContext.Current.ContainerManager.Resolve <IStoreService>(); _productPictureService = EngineContext.Current.ContainerManager.Resolve <IProductPictureService>(); _productService = EngineContext.Current.ContainerManager.Resolve <IProductService>(); _categoryService = EngineContext.Current.ContainerManager.Resolve <ICategoryService>(); _storeMappingService = EngineContext.Current.ContainerManager.Resolve <IStoreMappingService>(); _storeContext = EngineContext.Current.ContainerManager.Resolve <IStoreContext>(); _cacheManager = EngineContext.Current.ContainerManager.Resolve <ICacheManager>("nop_cache_static"); _webHookManager = webHookService.GetHookManager(); }