2

In a previous post it was mentioned that an overload of the Select method can be used to reference an index value. This would be exactly what I need to answer this question

However, when I try to use this overload as below, I get a NotSupportedException.

DbObjects.OrderBy (o => o.CreatedOn ).Select((o,i) => new {entity = o, rownumber = i})

Is this indexed overload supported by LINQ to Entities? Am I missing something in my query?

Community
  • 1
  • 1
Ralph Shillington
  • 20,718
  • 23
  • 91
  • 154

1 Answers1

1

Ralph, I did update that answer to fix the exception. It will work fine for him, but since it's client-side it's not what you need for your other question. No, L2E does not support this overload. I'll answer your other question over there.

Community
  • 1
  • 1
Craig Stuntz
  • 125,891
  • 12
  • 252
  • 273