public OrderedDictionary GetDailyJobs() { var allJobs = JobsCacheManager.ListDailyJobPostsShortDescription; int i = allJobs.Count; var list = new SortedList<DateTime, object>(); foreach (var item in allJobs) { var entry = (DictionaryEntry)item; var val = from j in (List<JobPostViewModel>)entry.Value select new { id = j.id, jobTitle = j.jobTitle, jobType = j.jobType, salaryMin = j.salaryMin, salaryMax = j.salaryMax, salaryNote = j.salaryNote }; list.Add((DateTime)entry.Key, val); } var r = new OrderedDictionary(); foreach (var item in list.Reverse()) r.Add(item.Key, item.Value); return r; }