Here you go:
from am in dc.AnimalMove
where am.Animal.Lookup.LookupCode == "ONY"
group am by am.AnimalId into g
select new
{
g.Key,
AnimalMoveActualDateTime = g.Max(g2 => g2.AnimalMoveActualDateTime)
}
Not having your mapping, I can't syntax check that, but it should be close.
Regards,
Dan Ruehle
> Any idea how to write this in LINQ?
>
[quoted text clipped - 8 lines]
> Thanks for any help,
> Ron
Ronald S. Cook - 31 Mar 2008 11:41 GMT
THANKS!
> Here you go:
>
[quoted text clipped - 25 lines]
>> Thanks for any help,
>> Ron