Exemplo n.º 1
0
        public ActionResult Create(Bank bank)
        {
            if (ModelState.IsValid)
            {
                db.Banks.Add(bank);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(bank);
        }
Exemplo n.º 2
0
 public ActionResult Edit(Bank bank)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bank).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(bank);
 }