标签:1.5 ext entry framework nbsp cti efault collect lis
Reference()和Collection() 方法
IList<Student> studList = context.Students.ToList<Student>();
Student std = studList.Where(s => s.StudentID == 1).FirstOrDefault<Student>();
//Loads Standard for particular Student only (seperate SQL query)
context.Entry(std).Reference(s => s.Standard).Load();
//Loads Courses for particular Student only (seperate SQL query)
context.Entry(std).Collection(s => s.Courses).Load();
标签:1.5 ext entry framework nbsp cti efault collect lis
原文地址:http://www.cnblogs.com/icebutterfly/p/6728028.html