public async Task <IActionResult> DeleteClient([FromRoute] string id) { var deletedClient = await repositoryClient.DeleteClientById(id); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (deletedClient == null) { return(NotFound()); } return(NoContent()); }