This project is read-only.


Take is not being sorted properly


After the sort, the Take(count) line doesn't sort correctly if you want to see newer entries first. Maybe this should be configurable as well, but I think most people want to see the last x entries, not the first x entries the feed happens to return. I added .OrderByDescending(t => t.PublishedDateTime) to both return lines and that gave me the results I was expecting.


atobrandon wrote Jun 27, 2011 at 3:12 PM

I thinks it's very important to have this added as an option to the configuration screen.

atobrandon wrote Jun 27, 2011 at 3:13 PM

Wow, what a typo... think not thinks ;-)

Naji_Abdelraziq wrote Aug 22, 2011 at 11:58 PM

Still this do not fix the issue !! Have anyone tried it and got latest x entries?

Naji_Abdelraziq wrote Aug 23, 2011 at 12:29 AM

it seems I didn't place the code correctly, here is the correct line of code:
return feedNewsViewModels.OrderByDescending(t => t.PublishedDateTime).Take(count).ToList();