I have a nested ListView. Kinda like this one:
http://mattberseth.com/blog/2008/01/building_a_grouping_grid_with.html
And the following Linq query:
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 });
I only want to load a few specific columns into the cgroup item. Just like you normally do with the "select" statement in SQL. Is that possible? I have a blob in the table and it takes ages to load if it is included.
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 }
});
var query = (from c in context.customer_order
where c.id > 8000
group c.Column by c.person_id into cgroup
select new { cgroup.Key, Orders = cgroup });
Or if you need a few column s:
var query = (from c in context.customer_order
where c.id > 8000
group new { c.Column1, c.Column2 } by c.person_id into cgroup
select new { cgroup.Key, Orders = cgroup });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With