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