Implementing Multi-Field Sorting in a Generic Repository Query Method
A generic repository method intended to support multi-field sorting was found to only apply the last specified sort field. The original implementation used a loop to build OrderBy or OrderByDescending expressions, but each iteration overwrote the previous one, failing to create a composite sort order.
The core issue was the misuse of OrderBy wi ...
Posted on Thu, 02 Jul 2026 17:27:59 +0000 by zeh