public JsonResultEntity Delete(int id) { var eventBL = new EventBL(); JsonResultEntity response = new JsonResultEntity(); try { var result = eventBL.DeleteById(id); if (result.HasWarning()) { response.Message = String.Join(",", result.Warning); return(response); } response.Success = true; response.Data = result.Value; } catch (Exception e) { response.Message = e.Message; LoggerHelper.Error(e); } return(response); }