Пример #1
0
 public ActionResult Edit(Stall stall)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stall).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(stall);
 }
Пример #2
0
        public ActionResult Create(Stall stall)
        {
            if (ModelState.IsValid)
            {
                db.Stalls.Add(stall);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(stall);
        }