Ejemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            var result = _rolesManager.Delete(id);

            if (result.Success)
            {
                StoreLog("Roles", "DELETE", id);
            }
            TempData["Result"] = result;
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public JsonResult Delete(int id)
        {
            try
            {
                rolesManager.Delete(id);
            }
            catch (Exception excp)
            {
                return(Json(new { Error = excp.Message.ToString() }));
            }

            return(Json(new { Message = "Role deleted successfully" }));
        }