Hi, I'm doing a group by with subsonic but I'm not getting the results expected.
var settings = from setting in setting_query
group setting by setting.ColumnName into g
select g;
var items = settings.ToList().Select(s => s.First()).ToList();
var items2 = settings.Select(s => s.First()).ToList();
"items" gets the correct result, but then I have to make it a list first and execute the query.
"items2" gets the correct number of results, but the only value I get is the one that I grouped by, all the other fields are null or empty.
The following would be the best answer:
var settings = from setting in setting_query
group setting by setting.ColumnName into g
select g.First();
But that gives the same result as "items2". That is that the only field filled is the one I grouped by and not all fields.