I'm testing the 101 Linq samples and found one of them not working as expected.
The test is 'Group By/Having' - 'GroupBy with Conditional Count' (or LinqToOpenAccessGroupBy07)
The function should only count discontinued products, but counts all instead. Exact same result as LinqToOpenAccessGroupBy06.
The linq code is as follows:
var q = from p
group p by p.Category.CategoryID into g
NumProducts = g.Count(p => p.Discontinued)