Return to Snippet

Revision: 51897
at October 6, 2011 23:59 by Krummelz

Initial Code
from p in PersonOrders
// put your where clause here
group p by p.PersonID into grp //could be grouped by anything, Grouping on Guid ID's is not a good idea
let MaxOrderDatePerPerson = grp.Max ( g=>g.OrderDate )
from p in grp
where p.OrderDate == MaxOrderDatePerPerson
select p

Initial URL

Initial Description

Initial Title
LinQ to Entities, Max Date Field, Grouped By whatever

Initial Tags

Initial Language