sf 4.1 sp1 using orderby in where clause no longer works
so we upgraded to 4.1 sp1 and it broke some of our custom widgets. these widgets allow an editor to choose a category or multiple categories and then display the content from that category in the radrotator and a video list widget. (these are 2 different ones but work similarly)
anyways we were using
foreach
(NewsItem item
in
items.Where(n => n.Status == ContentLifecycleStatus.Live).OrderByDescending(n => n.DateCreated))
foreach
(NewsItem item
in
items.Where(n => n.Status == ContentLifecycleStatus.Live).Reverse())
4.1.1395.0 PE
Hi Brandon,
Thank you for using our services. Can you, please take a look at the provided sample I've just tested, and OrderByDescending was working fine when providing a RadGrid with the results.
var fluent = App.WorkWith();
var newsItems = fluent.NewsItems()
.Where(ni => ni.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live).Get().ToList()
.OrderByDescending(ni => ni.PublicationDate);
Grid1.DataSource = newsItems;
Grid1.DataBind();