Exemplo n.º 1
0
 public ActionResult Create(ProductModel NewProduct)
 {
     try
     {
         NewProduct.PhotoPath = Helper.GetMyFilePath(NewProduct.ImageFile, NewProduct.Name, Server);
         // TODO: Add insert logic here
         ProService.AddNewProduct(Helper.Mapper(NewProduct));
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(View());
     }
 }