public string DeleteEvent(int Id) { var result = new DataServiceResult(); try { siterepo.DeleteEvent(Id); result.Success = true; result.ResultMessage = "Deleted Successfully"; } catch (Exception ex) { result.Success = false; result.ResultMessage = "Failed to delete Data"; result.ExceptionInfo = new ExceptionInfo(ex); } return(JsonConvert.SerializeObject(result)); }