public ActionResult AddProdcutPost()
        {
            ProductData productData = new ProductData();

            TryUpdateModel(productData);
            if (ModelState.IsValid)
            {
                productsRespository.AddProductDetails(productData);
                TempData["Message"] = "product added succesfully";
                return(RedirectToAction("Index"));
            }
            return(View());
        }
예제 #2
0
 public ActionResult AddProdcut(ProductData product)
 {
     productsRespository.AddProductDetails(product);
     TempData["Message"] = "product added succesfully";
     return(RedirectToAction("Index"));
 }