C
C#3y ago
Dusty

EF Core + SQLite order by decimal value [Answered]

Hey I tried to sort a query via a decimal column but I get this exception: System.NotSupportedException: SQLite does not support expressions of type 'decimal' in ORDER BY clauses. Convert the values to a supported type, or use LINQ to Objects to order the results on the client side. I searched a bit an people were speaking about using custom collations. Sadly I haven't found anything else about this yet. I also tried client evaluation but this just takes too long as my table has several million entries :/ Any ideas on this?
3 Replies
Angius
Angius3y ago
https://github.com/dotnet/efcore/issues/18593 Seems you can add a conversion to double and that'll do the trick
Dusty
DustyOP3y ago
Thanks that works!
Accord
Accord3y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server