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