linq延迟加载的问题

使用Linq的时候常会遇到延迟加载带来的问题,好比2个表class(id,name),student(id,classId,name)html 当从数据层取到某个student对象后,想要取他对应的班级的名称,则会报上下文环境以被释放的错误!post 代码以下:htm 数据层: 对象          public student getStudentById(int id)blog       
相关文章
相关标签/搜索