public ActionResult Edit([Bind(Include = "TrainNo,TrainName,Departure,Destination")] tblTrain tblTrain) { if (ModelState.IsValid) { db.Entry(tblTrain).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblTrain)); }