public ActionResult Edit([Bind(Include = "Id,FirstName,LastName")] Students students) { if (ModelState.IsValid) { db.Entry(students).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(students)); }
public ActionResult Edit([Bind(Include = "Id,Name,Section,StartTime,EndTime,Length,Days")] Class @class) { if (ModelState.IsValid) { db.Entry(@class).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(@class)); }