コード例 #1
0
 public ActionResult Update(Role role)
 {
     try
     {
         var createdRole = _iFRole.Update(UserId, role);
         if (ModelState.IsValid)
         {
             TempData["message"] = "Role has been updated, successfully!";
         }
         return(RedirectToAction("Create"));
     }
     catch (Exception)
     {
         if (ModelState.IsValid)
         {
             // Do your stuff
             TempData["message"] = "Opps! Something went wrong. Please, try again.";
         }
         return(RedirectToAction("Create"));
     }
 }
コード例 #2
0
ファイル: RoleController.cs プロジェクト: Vexel8/Accounts
        public ActionResult Update(Role role)
        {
            var createdRole = _iFRole.Update(UserId, role);

            return(RedirectToAction("Index"));
        }