public async Task <ObjectResult> Delete(string Name) { _logger.LogInformation($"Delete book: {Name}"); var response = await readerService.DeleteBook(Name); if (response == null) { _logger.LogInformation("Internal gateway error"); return(StatusCode(500, "Internal error")); } if (response.Code != 200) { _logger.LogInformation("Can't delete book from readers"); return(StatusCode(response.Code, response.Message)); } response = await bookService.DeleteBook(Name); return(StatusCode(response.Code, response.Message)); }