I have a
List
that I retrieve from the database. However, I would like it keyed by a property in MyObject for grouping pu
It sounds like you want to group the MyObject instances by KeyedProperty and put that grouping into a Dictionary>. If so then try the following
MyObject
KeyedProperty
Dictionary>
List list = ...; var map = list .GroupBy(x => x.KeyedProperty) .ToDictionary(x => x.Key, x => x.ToList());