예제 #1
0
 public ActionResult Edit(Priority priority)
 {
     if (ModelState.IsValid)
     {
         db.Entry(priority).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(priority);
 }
예제 #2
0
        public ActionResult Create(Priority priority)
        {
            if (ModelState.IsValid)
            {
                db.Priorities.Add(priority);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(priority);
        }