public ActionResult Delete(string name, string system, ConfigSet model) { var cs = reader.GetConfigSet(name, system); if (!cs.UserHasAccessTo()) { throw new UnauthorizedAccessException("Access denied to configset"); } ViewBag.Id = cs.Id; reader.DeleteConfigSet(cs); return(RedirectToAction("Index", "Home")); }