public IActionResult Put([FromBody] Battery battery, [FromRoute] int id) { var isUpdateSuccessful = batteryService.Put(battery, id); if (isUpdateSuccessful) { return(NoContent()); } else { return(NotFound()); } }