public PokemonController(IPokemonConnection pokemonConnection) { ViewModel = new PokemonSearchViewModel { PokemonList = pokemonConnection.GetAllPokemon() }; }
public async Task <IActionResult> Index(PokemonSearchViewModel model) { return(RedirectToAction("Index", "Pokémon", new { name = model.PokemonName })); }