Quantcast
Channel: Sort list by post date
Browsing latest articles
Browse All 5 View Live

Sort list by post date

I was able to resolve this by doing the following.List<Models.News> SortedList = articles.OrderByDescending(o => o.posDate).ToList(); Return SortedList;

View Article



Sort list by post date

I got an error message saying:'System.Linq.IQueryable<API.Models.News>'does not contain a definition for 'Sort' and no extension method 'Sort' accepting a first argument of type...

View Article

Sort list by post date

Just add the orderby keyword right in the Linq statement:var articles =fromnewin _context.nm_tbl_news join ncte in _context.nm_tbl_news_cts on news.ID equals ncte.fldNEWS_ID join cte in...

View Article

Image may be NSFW.
Clik here to view.

Sort list by post date

Hi MaddTechWF,You could do some thing like this,article.Sort((x,y) => x.posDate.CompareTo(y.posDate));Hope this helps you.Thanks, Sabah Shariq [If a post helps to resolve your issue, please click...

View Article

Sort list by post date

I have the following code and I need to sort the data by the posDate with the newest at the top.using System; using System.Collections.Generic; using System.Linq; using System.Net; using...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images