Beispiel #1
0
 public ActionResult Edit(Stage stage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stage).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(stage);
 }
Beispiel #2
0
        public ActionResult Create(Stage stage)
        {
            if (ModelState.IsValid)
            {
                db.Stages.Add(stage);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(stage);
        }