public ActionResult Edit([Bind(Include = "CourseID,Title,Credits")] Course course) { if (ModelState.IsValid) { db.Entry(course).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(course)); }
public ActionResult Edit([Bind(Include = "ID,LastName,FirstMidName,EnrollmentDate")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "Id,Name,Age")] Students students) { if (ModelState.IsValid) { db.Entry(students).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(students)); }