using System.Collections.Generic;
public record TransportationOption(decimal? Price, string Carrier, DateTime? PickupDate);
public static void Main()
var transportationOptions = new List<TransportationOption>(){
new TransportationOption(Price: null, Carrier: null, PickupDate: null),
new TransportationOption(Price: 20.00m, Carrier: "AMZX", PickupDate: null),
new TransportationOption(Price: 10.00m, Carrier: "UPSD", PickupDate: DateTime.UtcNow.AddDays(2)),
new TransportationOption(Price: 10.00m, Carrier: "AMZX", PickupDate: DateTime.UtcNow.AddDays(1)),
var cheapestOption = transportationOptions
.OrderBy(to => to.Price ?? decimal.MaxValue)
.ThenBy(to => to.PickupDate ?? DateTime.MaxValue)
.ThenBy(to => to.Carrier)
Console.WriteLine(cheapestOption);