I need to sort a list on multiple values. Data comes from a MongoDb database and I load its from C#.
SAMPLE
Unsorted
OwnerId Status Date
123 New 2016-01-01
456 New 2016-01-01
789 New 2016-01-06
123 New 2016-01-05
456 Qualified 2016-01-05
789 Converted 2016-01-01
123 Qualified 2016-01-02
Expected
OwnerId Status Date
123 New 2016-01-05
123 New 2016-01-01
123 Qualified 2016-01-02
789 New 2016-01-06
456 New 2016-01-01
456 Qualified 2016-01-05
789 Converted 2016-01-01
I need to show OwnerId 456
first, then New
status first, then Date descending.
OwnerId is a dynamic value : it's my current authenticated user in my app. I can't access this value from anywhere. OwnerId value type is a GUID in real case.
I try this without success : c# How to sort a sorted list by its value column1
I hope my problem is enough understandable. Do not hesitate to ask more details. Thanks in advance.
Edited :
I can't achieve this with mongo directly. I need a C# solution.