public async Task<IActionResult> PutBookChapterAsync(Guid id, [FromBody]BookChapter chapter)
{
if (chapter == null || id != chapter.Id)
{
return BadRequest();
}
if (await _repository.FindAsync(id) == null)
{
return NotFound();
}
await _repository.UpdateAsync(chapter);
return new NoContentResult(); // 204
}