In this challenge let us explore LINQ GroupBy based on multiple properties.
The problem is to Group By Property1 if it matches certain condition or Property2 and collect a meaningful key for each row. As earlier, I use LinqPad to get the code working quickly.
The crux of the problem lies in the method
GetKey which returns a meaningful key for each row based on either
Output from LinQPad: