摘要:
要使用关联实体返回局部或完整的对象图,需要在LINQ 标准查询操作符之前执行Include()操作符,如下列查询所示,它将返回和前面“使用Include()操作符进行预先加载”一节同样的结果:using (NorthwindEntities ocNwind = new NorthwindEntities("name=NorthwindEntities")) { List orderList = null; ObjectQuery orders = ocNwind.Orders; orders.MergeOption = MergeOptions.AppendOnly; va 阅读全文