How can I create LINQ to SQL request where I can use group by with condition?
For example:
from ri in resItems
group ri by new {groupByPackaging ? (ri.Model, ri.Condition, ri.Packaging) : (ri.Model, ri.Condition)}
into g
select new
{
...
}