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