public ActionResult Edit() { Product _product = new Product(); _product.ProductID = Convert.ToInt32(Request.Form["ProductID"]); _product.ProductName = Request.Form["ProductName"]; _product.SupplierID = Convert.ToInt32(Request.Form["SupplierID"]); _product.CategoryID = Convert.ToInt32(Request.Form["CategoryID"]); _product.QuantityPerUnit = Request.Form["QuantityPerUnit"]; _product.UnitPrice = Convert.ToDecimal(Request.Form["UnitPrice"]); _product.UnitsInStock = Convert.ToInt16(Request.Form["UnitsInStock"]); _product.UnitsOnOrder = Convert.ToInt16(Request.Form["UnitsOnOrder"]); ProductDataContext.EditProduct(_product); return(RedirectToAction("Index")); }