Exemple #1
0
 public List <Jugadores> GetJugadores()
 {
     using (DbEstadisticaEntities db = new DbEstadisticaEntities())
     {
         return(db.Jugadores.ToList());
     }
 }
Exemple #2
0
        public void SetJugadores(string a, string b, string c, string d, string e, int f, int g, int t)
        {
            using (DbEstadisticaEntities Context = new DbEstadisticaEntities())
            {
                Jugadores jugador = new Jugadores()
                {
                    Nombre     = a,
                    Hits       = b,
                    Carreras   = c,
                    HomeRun    = d,
                    EquipoId   = f,
                    PosicionID = g,
                    ligaID     = t
                };

                Context.Jugadores.Add(jugador);
                Console.WriteLine("escrito en Base de datos");
            }
        }