Starting with 1:
ID HistID Item
5 361 Joe Smith
5 376 Prince Brown
34 250 Sue Blue
306 106 Jane Doe
306 238 Sandy Pink
392 390 Dawn Red
512 363 Gus Green
512 515 Joy Orange
512 49 Sam Strong
What is a suitable Linq or T-Sql query giving 2:
ID Item
5 Joe Smith,[br/]Prince Brown
34 Sue Blue
306 Jane Doe,[br/]Sandy Pink
392 Dawn Red
512 Gus Green,[br/]Joy Orange,[br/]Sam Strong
where ID
, HistID
and Item
are table column names or object properties
If the answer is the Linq variant then the result set must still be of IQueryable
, so that it can used in further queries allowing lazy evaluation.
In both cases an acceptable answer may have each Item ending with a ,[br/]
as well
PS: I am right in thinking that the .Aggregate()
method often used with Linq will not allow further lazy evaluation?