public ActionResult Agregar([Bind(Include = "idJugador,Apellido,Edad")] Jugador j)
 {
     if (ModelState.IsValid)
     {
         Jugadores.Agregar(j);
         return(Redirect("/Jugador/Lista"));
     }
     return(View(j));
 }
 public ActionResult Agregar([Bind(Include = "idJugador,Apellido,Edad,idClub")] Jugador j)
 {
     ViewBag.ListaClubes = Clubes.ObtenerTodos();
     if (ModelState.IsValid)
     {
         Jugadores.Agregar(j);
         return(Redirect("/Jugadores/Lista"));
     }
     return(View(j));
 }
Exemple #3
0
        public ActionResult AgregarJugador(jugador j)
        {
            serviceJugador.Agregar(j);

            return(RedirectToAction("Listado", "Jugador"));
        }