Hi smjejess-2326,
Have you tried the Dynamic Linq?
Please refer to the following threads:
Linq To SQL: Sort Query by Arbitrary Property(Column) Name
How does one sort using Entity Framework Dynamic “SortBy” string on a complex object?
Dynamic LINQ OrderBy on IEnumerable<T> / IQueryable<T>
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.