public JsonResult Delete(int id) { var jsonSuccessResult = new JsonSuccessResult(); try { Emails.Delete(id); jsonSuccessResult.Success = true; } catch (Exception ex) { jsonSuccessResult.Errors = new string[] { ex.Message }; jsonSuccessResult.Success = false; } return(new JsonResult() { Data = jsonSuccessResult }); }