Ejemplo n.º 1
0
        public IEnumerable <Pokemon> Index()
        {
            PkmContext            context = HttpContext.RequestServices.GetService(typeof(pkm_game_manager.Models.PkmContext)) as PkmContext;
            IEnumerable <Pokemon> pkmList = context.getPkm();

            return(pkmList);
        }
Ejemplo n.º 2
0
        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);
        }