public ActionResult Edit([Bind(Include = "Id,Name")] BusCompany busCompany) { if (ModelState.IsValid) { db.Entry(busCompany).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(busCompany)); }
public ActionResult Edit([Bind(Include = "Id,From,To,Price,Distance")] Destination destination) { if (ModelState.IsValid) { db.Entry(destination).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(destination)); }