public Task <List <Semestres> > getallAsync()
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             return(db.Semestres.ToListAsync());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(null);
     }
 }
Beispiel #2
0
 public IEnumerable <Estudiantes> getall()
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             return(db.Estudiantes.ToList());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(null);
     }
 }
 public IEnumerable <ActividadesPorGrupo> getall()
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             return(db.ActividadesPorGrupo.ToList());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(null);
     }
 }
Beispiel #4
0
 public int Edit(Estudiantes entity)
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             db.Entry(entity).State = System.Data.Entity.EntityState.Modified;
             return(db.SaveChanges());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(0);
     }
 }
Beispiel #5
0
 public int Delete(Estudiantes entity)
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             db.Estudiantes.Remove(entity);
             return(db.SaveChanges());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(0);
     }
 }
 public int Add(Grupo entity)
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             db.Grupos.Add(entity);
             return(db.SaveChanges());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(0);
     }
 }
 public int Delete(ActividadesPorGrupo entity)
 {
     try
     {
         using (var db = new BitacorasContexto())
         {
             db.ActividadesPorGrupo.Remove(entity);
             return(db.SaveChanges());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(0);
     }
 }
 public int Add(Semestres entity)
 {
     //throw new NotImplementedException();
     try
     {
         using (var db = new BitacorasContexto())
         {
             db.Semestres.Add(entity);
             return(db.SaveChanges());
         }
     }
     catch (Exception e)
     {
         log.Error(DateTime.Now + " " + e);
         return(0);
     }
 }
        public int Edit(ActividadesPorGrupo entity)
        {
            try
            {
                using (var db = new BitacorasContexto())
                {
                    db.Entry(entity).State = System.Data.Entity.EntityState.Modified;
                    return(db.SaveChanges());
                }
            }
            catch (Exception e)
            {
                log.Error(DateTime.Now + " " + e);
                return(0);
            }

            //throw new NotImplementedException();
        }
Beispiel #10
0
 public IntegrantesPorGruposController(BitacorasContexto context)
 {
     _context = context;
 }
 public DocentesController(BitacorasContexto context)
 {
     _context = context;
 }
 public EstudiantesController(BitacorasContexto context)
 {
     _context = context;
 }
 public GruposController(BitacorasContexto context)
 {
     _context = context;
 }