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