// GET: Home/SysExceptions public ActionResult SysExceptions() { List<Models.ExceptionModel> model = null; using (Contexts.HomeContext context = new Contexts.HomeContext()) { model = context.GetSysExceptions(); } return View(model); }
public JsonResult DeleteSysException(int id = 0) { try { using (Contexts.HomeContext context = new Contexts.HomeContext()) { context.DeleteSysException(id); } return Json(new JsonResponseModel() { Status = 0, Message = "Успешно изтриване." }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { return Json(new JsonResponseModel() { Status = 1, Message = ex.Message }, JsonRequestBehavior.AllowGet); } }