I have a variable of type Dictionary<MyType, List<MyOtherType>>
I want to convert it to a Lookup<MyType, MyOtehrType>
.
I wanted to use Lambda functions to first, flatten the dictionary and then convert this to Lookup using the ToLookup()
. I got stuck with the dictionary. I thought about using SelectMany but can't get it working. Anyone has got an idea how to do it?