Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
OrderbyDescending on AsQueryable throws exception #1741
When I try use OrderByDescending on AsQueryable I receive the error message below.
When I use OrderBy the code executes perfectly. I stumbled onto this because I needed to pass an expression in my orderbyDescending and cannot do that on a list.
blazor.webassembly.js:1 Uncaught (in promise) Error: System.NullReferenceException: Object reference not set to an instance of an object.
My workaround for now is to perform a reverse on the List after the order by is called.
For example: AsQueryable().OrderBy(expression).ToList().Reverse().ToList()