public ActionResult Edit(VehicleType model) { ViewBag.Head = "Manage Vehicle Type"; ViewBag.Form = "Vehicle Type Updation"; if (ModelState.IsValid) { try { _rep.Edit(model); } catch (Exception) { throw; } return(RedirectToAction("Index")); } else { return(View(model)); } }