public void Eliminar(int id) { try { SISECOOBEntities db = new SISECOOBEntities(); SubProgramasEdu pro = db.SubProgramasEdu.FirstOrDefault(i => i.SubprogramaID == id); db.SubProgramasEdu.DeleteObject(pro); db.SaveChanges(); } catch (Exception e) { throw e; } }
public void Editar() { try { SISECOOBEntities db = new SISECOOBEntities(); SubProgramasEdu pro = db.SubProgramasEdu.FirstOrDefault(i => i.SubprogramaID == this.SubprogramaID); pro.Subprograma = Subprograma; db.SaveChanges(); } catch (Exception e) { throw e; } }