please consider this code:
var result = data
.GroupBy(a => groupA.Contains(a.Group) ? "A" :
groupB.Contains(a.Group) ? "B" :
"N/a")
.Select(a => new
{
KEY = a.Key,
VALUE = a.Count()
});
can any one help how to convert GroupBy to LINQ version?
thanks
Edit 1)
I want this style:
from a in ....
group a by ....
select ...
you can try somethink like this but I would stick to what you have if it works