-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentOutOfRangeException when ordering by a constant #9758
Comments
I have similar case (at least the same stacktrace) but in my case it also fails on "regular" |
Yes, without the Include it works. Even if i do something like ThenBy(p => p.Children.Count) |
And you should post a repro since your case sounds much more serious. Hopefully that would be fixed in 2,1. My case is not important since it can be solved with a quasi constant like .OrderBy(o=>o.Id>0) |
Duplicate of #10045 |
Dear, first, excuse my English. I found a similar error. Follow steps to simuate: var query = db.Person I'm using EF 2.0.1 version em System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) |
This case is kind of silly and can easily be worked around. Ill post it anyway since it could be a symptom
of something more serious. First call works but when sorting by a constant first an Exception is thrown. No data needed for this test.
Further technical details
EF Core version: 2.0 and latest preview
Database Provider: SQL, Azure and Express
Operating system: Windows
IDE: VS2017
The text was updated successfully, but these errors were encountered: