Exemplo n.º 1
0
 public ActionResult Edit(Stall stall)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stall).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(stall);
 }
Exemplo n.º 2
0
        public ActionResult Create(Stall stall)
        {
            if (ModelState.IsValid)
            {
                db.Stalls.Add(stall);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(stall);
        }