public ActionResult Edit(int id) { try { pv.cargo = carm.read(); pv.cargotype = ctm.read(); pv._product = pm.filterread(x => x.id == id); pv.repository = rm.read(); pv.product = pm.read(); pv.category = cm.read(); return(View(pv)); } catch { return(RedirectToAction("Index")); } }
// GET: Productdetailpage public ActionResult Index(int id) { vm.product = pm.filterread(x => x.id == id); return(View(vm)); }