using System.Collections.Generic;
public static void Main()
var product1 = new Product() { Name = "C# Eval Expression", Url = "https://eval-expression.net/", Type = "Paid" };
var product2 = new Product() { Name = "Dapper Plus", Url = "https://dapper-plus.net/", Type = "Paid" };
var product3 = new Product() { Name = "Entity Framework Extensions", Url = "https://entityframework-extensions.net/", Type = "Paid" };
var product4 = new Product() { Name = ".NET Fiddle", Url = "https://dotnetfiddle.net/", Type = "Free" };
var product5 = new Product() { Name = "SQL Fiddle", Url = "https://sqlfiddle.com/", Type = "Free" };
var product6 = new Product() { Name = "ZZZ Code AI", Url = "https://zzzcode.ai/", Type = "Free" };
var list = new List<Product>() { product1, product2, product3, product4, product5, product6 };
var thenByDescendingList = list.OrderByDynamic("x => x.Type").ThenByDescendingDynamic("x => x.Name").ToList();
FiddleHelper.WriteTable("1 - thenByDescendingList:", thenByDescendingList);
public string Name { get; set; }
public string Url { get; set; }
public string Type { get; set; }