This project has moved and is read-only. For the latest updates, please go here.

FirstOrDefault in select

May 9, 2013 at 1:51 PM
Hi, I'm getting a not implemented exception when doing a FirstOrDefault on a linq query

....(group bys, order bys etc here)
.GroupBy(n => n.Id)
.Select(n => new MyContainer { Id = n.Key, Date = n.FirstOrDefault().Date });

If I remove the Date portion I don't receive the error, any ideas?

Cheers
May 9, 2013 at 2:00 PM
Oh, I'm using Entity Framework 4.3.1 with Model First if that is any significance (is the tool compatible with such an old version of EF?!!)
May 9, 2013 at 2:24 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.