public IActionResult PutSuperHero([FromRoute] int id, [FromBody] SuperHero superHero) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != superHero.Id) { return(BadRequest()); } try { _superHeroService.Update(id, superHero); } catch (Exception ex) { throw ex; } return(NoContent()); }