public ActionResult Edit(ProductCatalogViewModel product)
 {
     try
     {
         // TODO: Add update logic here
         if (ModelState.IsValid)
         {
             return RedirectToAction("Index");
         }
         else
         {
             return View(product);
         }
     }
     catch
     {
         return View();
     }
 }
        public static ProductCatalogViewModel ToProductCatalogModel(this ProductBasicData productData)
        {
            ProductCatalogViewModel returnValue = new ProductCatalogViewModel()
            {
                Description = productData.Description,
                ProductId = productData.ProductId,

            };

            if (productData.ExtendedData != null && productData.ExtendedData.NutritionTable != null)
            {

                returnValue.NutritionTable = new List<NutritionTableViewModel>();
                foreach (var item in productData.ExtendedData.NutritionTable)
                {
                    returnValue.NutritionTable.Add(new NutritionTableViewModel() { Name = item.Name, Value = item.Value });
                }
            }
            else
            {
                returnValue.NutritionTable = new List<NutritionTableViewModel>();
            }
            return returnValue;
        }