コード例 #1
0
        public IActionResult AlterarHero([FromRoute] int id, [FromBody] Heroes hero, [FromQuery] Guid id2)
        {
            var heroAntigo = _repositorio.ObterPorId(id);

            if (heroAntigo == null)
            {
                return(NotFound());
            }
            heroAntigo.tx_nome = hero.tx_nome;

            _repositorio.Alterar(heroAntigo);
            return(Ok());
        }