public JsonResultEntity Delete(int id) { var cityBL = new CityBL(); JsonResultEntity response = new JsonResultEntity(); try { var result = cityBL.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); }