Exemple #1
0
        public async Task AddProduct(AddEditProduct product)
        {
            var result = await _productsClient.AddAsync(product);

            product.Uid = result.Uid;
            ImageHelper.SaveImagesFromProduct(product);
        }
        public async Task <ActionResult> Create(Product product)
        {
            if (ModelState.IsValid)
            {
                ProductsClient api = new ProductsClient();

                await api.AddAsync(product);

                return(RedirectToAction("Index"));
            }

            return(View(product));
        }