public async Task <IActionResult> PutBook([FromRoute] int bookId, [FromBody] Book book)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (bookId != book.Id)
            {
                return(BadRequest());
            }

            var bookExists = _bookService.BookExists(bookId);

            try
            {
                await _bookService.EditBookAsync(book);
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!bookExists)
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }