Пример #1
0
        public ActionResult Create(StepType steptype)
        {
            if (ModelState.IsValid)
            {
                steptype.ID = Guid.NewGuid();
                db.StepTypes.Add(steptype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

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