-
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
GroupBy LINQ expression could not be translated and is evaluated locally #13055
Comments
Same issue as in: OData/WebApi#1578 |
@smitpatel to take a look |
The exception message here is |
I've investigated further and accessed the expression tree associated with query that is generated using following code:
DebugView from expression:
HTH but since I see a lot of code from OData namespaces I guess I'll have to look for help there. |
Triage: closing as external since this is a case where OData is producing an invalid expression tree, as tracked by OData/WebApi#1413 |
LINQ GroupBy expression generated by OData
odata/file?$apply=groupby((FileType))
is not translated to SQL group by and executed locally which leads to exception being thrownSteps to reproduce
Run test solution: https://github.com/xmichaelx/ODataGroupByTest
In issue-workaround branch there is a workaround using linq2db which generated group by correctly.
Further technical details
EF Core version: 2.1.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10 Pro
IDE: Visual Studio 2017 15.7.5
The text was updated successfully, but these errors were encountered: