public IActionResult DeleteWorker(string id) { try { if (_accountsServices.DeleteWorkerAccount(id)) { return(NoContent()); } return(NotFound("Worker account with id not found")); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }