public ActionResult DeleteCategory(Guid id) { try { var res = ApiUtil.DeleteCategory(id); return(RedirectToAction("ListCategory")); } catch (System.Exception ex) { return(RedirectToAction("Index", new RouteValueDictionary(new { controller = "ErrorHandler", action = "Index", data = ex.InnerException?.Message ?? ex.Message }))); } }