public async Task <IActionResult> PutComicBook([FromRoute] int id, [FromBody] ComicBook comicBook) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != comicBook.Id) { return(BadRequest()); } _context.Entry(comicBook).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ComicBookExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }