I have a Dictionary<DateTime, List<Item>>
Dictionary<DateTime, List<Item>> result =
myList
.GroupBy(k => new DateTime(k.Created.Value.Year, k.Created.Value.Month, 1))
.OrderByDescending(k => k.Key)
.ToDictionary(k => k.Key, v => v.ToList());
This will take a List<Item>
groups it per year/month, order it descending (newest first) then creates a dictionary out of it.
My Question is: how can I OrderByDescending also the List within the Dictionary based on the the DateTime nullable (newest first)?