public HttpResponseMessage Delete(int Id) { try { bool isDeleted = service.deleteEmployeeDetail(Id); if (isDeleted) { return(Request.CreateResponse(HttpStatusCode.OK, sysLanguage.CompanyTitlesControllerStrings.delete_title)); } else { return(Request.CreateErrorResponse(HttpStatusCode.SeeOther, sysLanguage.CompanyTitlesControllerStrings.delete_titleError)); } } catch (Exception) { return(Request.CreateErrorResponse(HttpStatusCode.SeeOther, sysLanguage.CompanyTitlesControllerStrings.delete_titleError)); } }