0

Possible Duplicate:
Is it possible to Pivot data using LINQ?

I have something like this:

Name    WeekNo  Count
Andreas 1       1
Mary    1       1
Frank   1       1
Vince   1       1
Andreas 2       3
Rick    2       1
Mary    2       2
Mary    3       7
(and so on...)

Assumed we have no clue about possible values assumed by WeekNo and Count columns, is it possible to obtain this in a LINQ query?

Name    1       2       3 <-- values of WeekNo column
Andreas 1       3       0
Mary    1       2       7
Rick    0       1       0

Community
  • 1
  • 1
silentman.it
  • 251
  • 5
  • 18
  • 2
    Top link in Google for "Linq Pivot" links back to SO. There's no excuse for missing this. – spender Nov 03 '10 at 15:56
  • If you don't know the WeekNo values ahead of time, you have to project into xml or some type that does not have properies defined ahead of time. – Amy B Nov 03 '10 at 18:24

0 Answers0