public async Task <IActionResult> PutActor(int id, Actor actor) { if (actor == null || id != actor.Id) { return(BadRequest()); } if (!_actorRepository.ActorExists(id)) { return(NotFound()); } return(Ok(await _actorRepository.PutActor(id, actor))); }
public bool ActorExists(int id) { return(_actorRepo.ActorExists(id)); }