Hi,
I have the following LINQ example:
var colorDistribution =
from product in ctx.Products
group product by product.Color
into productColors
select
new
{
Color = productColors.Key,
Count = productColors.Count()
};
All this works and makes perfect sense.
What I'm trying to achieve is to group by into a strong type instead of anonymous type.
For example I have a ProductColour class and I would like to Group into a List<ProductColour>
Is this possible?
Thank you