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