public ActionResult Edit([Bind(Include = "Id,Title")] Subject subject) { if (ModelState.IsValid) { db.Entry(subject).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(subject); }
public ActionResult Edit([Bind(Include = "Id,Name")] Teacher teacher) { if (ModelState.IsValid) { db.Entry(teacher).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(teacher)); }