In ASP.NET 4, I’m trying to write a case statement in a group by with LINQ-To-SQL.
For example, I’m trying to do this:
Select ...
FROM Table T
GROUP BY CASE
WHEN T.COLUMN1 IS NULL THEN T.COLUMN2
ELSE T.COLUMN3
END
How would you translate that query in LINQ?
Something like