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