public bool DeActivate(int id) { try { if (id > 0) { var isSuccess = _designation.ToggleActiveDesignation(id); } } catch (Exception ex) { throw new ApiDataException(1000, "Designation not Deactivate", HttpStatusCode.NotFound); } return(true); }