public PlanEstudio Obtener(int id) //retornar un objeto { var planestudio = new PlanEstudio(); try { using (var db = new ModeloDatos()) { planestudio = db.PlanEstudio.Include("Semestre"). Where(x => x.plan_id == id). SingleOrDefault(); } } catch (Exception e) { throw; } return(planestudio); }
public string obtenerplan(int id) { var curso = new PlanEstudio(); try { using (var db = new ModeloDatos()) { curso = db.PlanEstudio. Where(x => x.plan_id == id). SingleOrDefault(); } } catch (Exception e) { throw; } return(curso.nombre); }