public IEnumerable <Pokemon> Index() { PkmContext context = HttpContext.RequestServices.GetService(typeof(pkm_game_manager.Models.PkmContext)) as PkmContext; IEnumerable <Pokemon> pkmList = context.getPkm(); return(pkmList); }
public IEnumerable <Pokemon> SavePkm(Pokemon pkm)//public IActionResult SavePkm(Pokemon pkm) { PkmContext context = HttpContext.RequestServices.GetService(typeof(pkm_game_manager.Models.PkmContext)) as PkmContext; context.savePokemon(pkm); //return View(); IEnumerable <Pokemon> pkmList = context.getPkm(); return(pkmList); }