MasterDetail Linq

代码:

 1 var ds = (from v in XXXCollection
 2          where ......
 3          select new {
 4             ......
 5             ChildList = (from s in YYYCollection
 6                          where ......
 7                 select new {
 8                     ......
 9                 }).ToList()
10          }).ToList();
11 gcDataCtrl.DataSource = ds;

 

posted @ 2013-12-16 10:28  zhuhc  阅读(161)  评论(0编辑  收藏  举报