Can somebody suggest me what Linq operator should I use to write an elegant code to convert List to Dictionary of list?
Eg. I have a list of person (List<Person>) and I wanted to convert that to dictionary of list (like Dictionary<string, List<Person>> using the person’s last name as a key. I needed that for quickly lookup the list of persons by the last name
Can somebody suggest me what Linq operator should I use to write an elegant
Share
To get a
Dictionary<string, List<Person>>fromList<Person>: