public IActionResult PutBookChapter(string id, [FromBody]BookChapter chapter)
{
if (chapter == null || id != chapter.Id)
{
return BadRequest();
}
if (_repository.Find(id) == null)
{
return NotFound();
}
_repository.Update(chapter);
return new NoContentResult(); // 204
}