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