public ActionResult Create(Faculty faculty) { if (ModelState.IsValid) { db.Faculties.Add(faculty); db.SaveChanges(); return RedirectToAction("Index"); } return View(faculty); }
public ActionResult Edit(Faculty faculty) { if (ModelState.IsValid) { db.Entry(faculty).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(faculty); }