public IActionResult Put(int id, [FromBody] Actor actor) { if (!ModelState.IsValid) { return(BadRequest()); } // int success = actors.UpdateActorById(id, actor); int success = actors.UpdateActorByIdEntityState(id, actor); if (success == 1) { return(Ok()); } return(BadRequest()); }