I have a view in SQL server that is an aggregation of a many to many. So the data returned is something like this:
User1 : Data1
User1 : Data2
User1 : Data3
User2 : Data1
User2 : Data2
etc.
Normally if I'm using LINQ with Entity Framework I use the navigation properties and get nested lists. So I can loop through Users and a nested loop through the data from the join table.
With a flat view, it is just one big list. I'm trying to group on the user so I can use the same foreach loops to display data.
E.g.,
User1 - Data1, Data2, Data3
User2 - Data1, Data2, Data3
Is there a way to create the grouping this way based on a single table (view)
Hope this makes sense.