public ActionResult Delete(int id) { var Pokemon = _PokemonService.GetPokemon(id); _PokemonService.DeletePokemon(id); return(RedirectToAction("List", new { UserId = Pokemon.UserId })); }
public async Task <IActionResult> DeletePokemon(int pokemonNumber) { ServiceResponse <GetPokemonDto> response = await _pokemonService.DeletePokemon(pokemonNumber); if (response.Data == null) { return(NotFound(response)); } return(Ok(response)); }
public async Task <IActionResult> DeletePokemon(int id) { return(Ok(await _service.DeletePokemon(id))); }
public ActionResult Delete(int id) { _pokemonService.DeletePokemon(id); return(RedirectToAction("List")); }
public IActionResult DeletePokemon(int id) { return(Ok(_pokemon.DeletePokemon(id))); }