I'm totally baffled and cannot find anything on the internet about this, so I must be doing something wrong?
_positionsRepo.GetAllTrades().OrderByDescending(x => x.TotalPLPercent).ToList();
TotalPLPercent is a decimal field. the result order sorts like this:
96.76
95.54
8.54
75.55
231.22
13
Obviously, this is wrong. I tested the sort against another field that was a double, and it worked as expected. What am I missing here about decimals in C#?
I am using the Mongo DB C# driver.