public IActionResult BuscarPorId(int id) { try { return(repositorio.BuscarPorId(id) != null?Ok(repositorio.BuscarPorId(id)) : throw new Exception()); } catch (Exception ex) { return(NotFound(ex.Message)); } }
public IEnumerable <Autores> BuscarPorId(int id) { return(autorRepository.BuscarPorId(id)); }