public IHttpActionResult DeleteCompany(int id) { try { CompanyModel companyModel = new CompanyModel(); companyModel.DeleteById(id); //RedisCacheHelper.DeleteCompanyCache(id); return(Content(HttpStatusCode.OK, HttpResponseFormat.Success())); } catch (CDSException cdsEx) { return(Content(HttpStatusCode.BadRequest, CDSException.GetCDSErrorMessageByCode(cdsEx.ErrorId))); } catch (Exception ex) { string logAPI = "[Delete] " + Request.RequestUri.ToString(); StringBuilder logMessage = LogHelper.BuildExceptionMessage(ex); Global._appLogger.Error(logAPI + logMessage); return(Content(HttpStatusCode.InternalServerError, ex)); } }