Answers for "c# linq sorting sequential guids"

C#
0

c# linq sorting sequential guids

// https://stackoverflow.com/questions/48806510/descending-order-in-listguid-is-different-then-iqueryable-orderbydescending
// A cast to System.Data.SqlTypes.SqlGuid is needed to perform the same in-memory linq-sorting-result in comparison to SQL-Server sorting of UNIQUEIDENTIFIER
yourCollection.OrderBy(x => new SqlGuid(x.YourGuid))
Posted by: Guest on March-04-2021

C# Answers by Framework

Browse Popular Code Answers by Language