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()); }
public ActionResult AddProdcut(ProductData product) { productsRespository.AddProductDetails(product); TempData["Message"] = "product added succesfully"; return(RedirectToAction("Index")); }