Esempio n. 1
0
        public ActionResult Create(webpages_Role webpages_role)
        {
            if (ModelState.IsValid)
            {
                db.Roles.Add(webpages_role);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(webpages_role);
        }
Esempio n. 2
0
 public ActionResult Edit(webpages_Role webpages_role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(webpages_role).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(webpages_role);
 }