What is a LINQ operator? LINQ operators are a collection of 50 methods. These operators can execute against diverse data sources. Operators can be used locally to query an object in memory but can also be used when working with objects stored in a relational database, in XML, behind a web service and more. Lets […]
LINQ Operators in ASP.NET – Ordering Operators Original Post Simply put ordering operators are used in ordering lists. OrderBy, OrderByDescending, ThenBy, ThenByDescending = Make up a family of operators that can be composed to order a sequence by multiple keys. Reverse = Reverses the elements of a sequence.
IEnumerable<Product> orderedProducts = products
.OrderBy(p => p.Category)
.ThenByDescending(p => p.UnitPrice)
.ThenBy(p => p.Name);
Related Atricles Restriction Operators LINQ Part […]