Using Where and Group in Linq
I tried lots of Google time to find the answer to this and failed (my google searching may also suck :) so in trying to tie a Where and GroupBy together in a Linq query I used the following.
var values = from p in tbl_data
where
p.some_other_value == 'hello world'
select p;
var group_values = values.GroupBy(p => p.a_value).ToList();
I've seen lots of queries that place the groupby in the from and but never with a Where, there may be a nicer way of doing it but the above works for me :)