Answer the question
In order to leave comments, you need to log in
C#. How to properly group from List to Dictionary?
There is data from the database that looks something like this:
CarId = 2, UserId = 44
CarId = 2, UserId = 45
CarId = 2, UserId = 46
CarId = 1, UserId = 90
CarId = 1, UserId = 91
I want to convert to the form CarId, List
Example:
CarId = 2, UserId = <44,45,46>
CarId = 1, UserId = <90,91>
How can this be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question