Example #1
0
 public ActionResult EditPeopleType(PeopleType type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(type).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("PeopleType");
     }
     return View(type);
 }
Example #2
0
        public ActionResult CreatePeopleType(PeopleType type)
        {
            if (ModelState.IsValid)
            {
                db.PeopleTypes.Add(type);
                db.SaveChanges();
                return RedirectToAction("PeopleType");
            }

            return View(type);
        }