I have banged my head against some LINQ to Entities stuff today. It started out when i was doing a query to get some stats out of my forum. I should point out that i’m a newbe with LINQ to Entities and the Entity Framework so if i have done anything stupid here you are [...]
Posted on 24 November 2008, 13:16, by Ola, under
LINQ.
Today i wanted to do a group by query with LINQ wich is something i never done before. I turned out to be kind of easy.
If you just want to group by a single field.
(from s in db.CrewStatsSet
where s.LogDate >= date1 && s.LogDate <= date2 && s.Action == action
group s by s.User.nick into g
orderby g.Count() [...]