我有一个嵌套的 ListView。有点像这个:
http://mattberseth.com/blog/2008/01/building_a_grouping_grid_with.html
以及以下 Linq 查询:
var query = (from c in context.customer_order
where c.id > 8000
group c by c.person_id into cgroup
select new { cgroup.Key, Orders = cgroup });
我只想将一些特定列加载到 cgroup 项中。
就像您通常使用 SQL 中的“select”语句一样。
那可能吗?我的表中有一个斑点,如果包含它,则需要很长时间才能加载。
var query = (from c in context.customer_order
where c.id > 8000
group c by c.person_id into cgroup
select new { cgroup.Key, Orders =
from item in cgroup
select new { item.Foo, item.Bar }
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)