1. Bernie Rivera
  2. .NET DataStore
  3. Wednesday, 3 June 2020 22:14 PM UTC

How do you do a sort off of multiple fields?

The SortBy for a C# DataStore only seems to accept one key field.


Accepted Answer
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Thursday, 4 June 2020 03:09 AM UTC
  2. .NET DataStore
  3. # Permalink

Hi Bernie,

Please see the following code example:

ds.SortBy<D_Sq_Gr_Product>(o => o.Productid)
.ThenBy(o => o.Productline)
.ThenByDescending(o => o.Sellstartdate)



  1. Bernie Rivera
  2. Thursday, 4 June 2020 16:19 PM UTC
Thanks, that was what I was looking for.
  1. Helpful
There are no comments made yet.

There are replies in this question but you are not allowed to view the replies from this question.