Closed JaronrH closed 5 years ago
Thanks for the heads up! I haven't gotten around to testing this on .NET Core 3 yet. I'll look into this ASAP.
Just pushed an update which resolves this issue and adds compatibility with Entity Framework Core 3.
Thanks for the update! (and your fix is even better then what I did!)
Haha yeah, there were a couple tests that didn't pass with your changes when running on full framework, but I definitely used your changes and just made a few minor modifications from there to get everything passing, so it was much appreciated!
I'm currently working on updating an application to EF Core 3.0 and I found a possible issue with sorting with Collate.NET. SortExpressionBuilder.cs throws a null exception when trying to apply the first OrderBy/OrderByDescending operation. Apparently, the source being passed in can no longer be cast to IOrderedQueryable in QueryableExtensions.IOrderedQueryable Sort(this IQueryable source, IEnumerable sorts) .
I was able to fix it by passing in the original Quaryable then checking to see if it could be cast correctly. The fix will require more testing but it appears to be working for me so I wanted to give you a heads up!
QueryableExtensions.cs (2 Lines Changed):
SortExpressionBuilder.cs (3 Lines Changed/Added):