Sometimes Web developers have to sort the returned data. The LINQ orderby clause sorts the elements in the returned sequence according to the default comparer for the type being sorted. For example, the following query can be extended to sort the results based on the FirstName property. Because FirstName is a string, the default comparer performs an alphabetical sort from A to Z:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition


Dim qryNYClients = From client In clients

Where client.City = “New York”

Order By client.FirstName Ascending

Select client


Web developers can order the results in reverse order, from Z to A, by using the Order By…Descending clause.

If you want to host ASP.NET 4 application then you will need ASP.NET 4.0 hosting provider which supports .NET 4.0 Framework.