Hi I have a foreach loop which lists out all the articles in a service layer, all the articles have a public system namespace DateTime attached to them. I want to edit the foreach loop so i can add a condition to sort the articles descending using the time they where created.
This is what I have at the moment below
@foreach (var Article in _Articles)
{}
This is what I want but obviously this doesn't work
@foreach (var Article in _Articles.OrderByDescending where _article.CreatedOn )
{}