public ActionResult Edit([Bind(Include = "ID,TName")] Teacher teacher) { if (ModelState.IsValid) { db.Entry(teacher).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(teacher)); }
public ActionResult Edit([Bind(Include = "ID,ClassID")] Grades grades) { if (ModelState.IsValid) { db.Entry(grades).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(grades)); }
public ActionResult Edit([Bind(Include = "ID,TeacherID,StudentID")] Class @class) { if (ModelState.IsValid) { db.Entry(@class).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(@class)); }
public ActionResult Edit([Bind(Include = "ID,SName,SLastName,SAge")] 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,SemesterName,TeacherID,StudentID")] Semester semester) { if (ModelState.IsValid) { db.Entry(semester).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(semester)); }