예제 #1
0
        public static List <Estudiantes> GetLista()
        {
            var lista = new List <Estudiantes>();

            var db = new ClaseDb();

            lista = db.Estudiante.ToList();

            return(lista);
        }
예제 #2
0
        public static bool Insertar(Estudiantes est)
        {
            bool retorno = false;

            try
            {
                var db = new ClaseDb();

                db.Estudiante.Add(est);
                db.SaveChanges();
                retorno = true;
            }
            catch (Exception)
            {
                throw;
            }

            return(retorno);
        }
예제 #3
0
        public static bool Insertar(Grupos grp)
        {
            bool retorno = false;

            try
            {
                ClaseDb db = new ClaseDb();

                db.Grupo.Add(grp);
                db.SaveChanges();

                retorno = true;
            }
            catch (Exception)
            {
                throw;
            }

            return(retorno);
        }