public IActionResult Nuevo(Pokemon p)
        {
            if (ModelState.IsValid)
            {
                // Guardar el objeto Pokemon (p)
                _context.Add(p);
                _context.SaveChanges();

                return(RedirectToAction("Lista"));
            }

            return(View(p));
        }
 public void Insert(PokemonToPokemonType value)
 {
     Db.PokemonToPokemonTypes.Add(value);
     Db.SaveChanges();
 }
 public void Insert(PokemonToPokemonSkill value)
 {
     Db.PokemonToPokemonSkills.Add(value);
     Db.SaveChanges();
 }
示例#4
0
 public void Insert(Pokemon value)
 {
     Db.Pokemons.Add(value);
     Db.SaveChanges();
 }