我有2个POCO课程:
public class Student
{
public int StudentId { get; set; }
public string StudentName { get; set; }
public virtual ICollection<Course> Courses { get; set; }
}
public class Course
{
public int CourseId { get; set; }
public string CourseName { get; set; }
public virtual Student { get; set; }
}
我还为我的DbContext设置了以下设置:
Configuration.LazyLoadingEnabled = false;
Configuration.ProxyCreationEnabled = false;
我使用WCF项目退出: myContext.Students.Include(s =&gt; s.Courses).ToList();
在Web服务客户端我得到底层连接已关闭:连接意外关闭。错误
有人能帮帮我吗?