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

            return View(stage);
        }