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); } }
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(); }