Exemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            var Pokemon = _PokemonService.GetPokemon(id);

            _PokemonService.DeletePokemon(id);

            return(RedirectToAction("List", new { UserId = Pokemon.UserId }));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeletePokemon(int pokemonNumber)
        {
            ServiceResponse <GetPokemonDto> response = await _pokemonService.DeletePokemon(pokemonNumber);

            if (response.Data == null)
            {
                return(NotFound(response));
            }

            return(Ok(response));
        }
Exemplo n.º 3
0
 public async Task <IActionResult> DeletePokemon(int id)
 {
     return(Ok(await _service.DeletePokemon(id)));
 }
Exemplo n.º 4
0
        public ActionResult Delete(int id)
        {
            _pokemonService.DeletePokemon(id);

            return(RedirectToAction("List"));
        }
Exemplo n.º 5
0
 public IActionResult DeletePokemon(int id)
 {
     return(Ok(_pokemon.DeletePokemon(id)));
 }