Beispiel #1
0
        //maakt een product aan voor elk product in de csv
        public static void CreateProducts(IEnumerable <CsvProduct> products)
        {
            ProductResult productResult;

            foreach (CsvProduct product in products)
            {
                productResult = ProductResult.ConvertCSVProductToProduct(product);
            }
        }
Beispiel #2
0
        public static ProductResult ConvertCSVProductToProduct(CsvProduct csvProduct)
        {
            var result = new ProductResult();

            //product maken aan de hand van csv
            try
            {
                var productCategory = CreateCategorie(csvProduct);
                var productID       = CreateProduct(csvProduct, productCategory);
                CreateImage(csvProduct, productID);
                result.Succeeded = true;

                return(result);
            } catch (Exception ex)
            {
                result.Succeeded = false;
                return(result);
            }
        }