示例#1
0
        public ActionResult Create(UserStories userstories)
        {
            if (ModelState.IsValid)
            {
                db.UserStories.Add(userstories);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(userstories);
        }
示例#2
0
 public ActionResult Edit(UserStories userstories)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userstories).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(userstories);
 }