-
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
Group By subquery when applied on another Query throws InvalidOperation Exception #28258
Comments
@ajcvickers Items under this tag ef6-parity will be fixed and released with 7.0? |
@ajcvickers @AndriySvyryd |
@ankitmatrix08 We are making a best effort to cover all EF6 issues, but in some cases this may not be possible. @smitpatel Can likely provide some more specific information on this query. |
This is in backlog and won't be fixed in 7.0 |
@ajcvickers @smitpatel The first priority should have been given to narrowing the gap between EF6 and EFCore, otherwise how could the existing applications be migrated? |
Please refer to https://docs.microsoft.com/en-us/ef/core/what-is-new/release-planning |
@smitpatel Shouldn’t all server side eval EF6 queries be on the priority list? For applications to be successfully and with minimal efforts be migrated to EFCore, is it too much to ask? Or kindly answer this - by which major release of EFCore should we expect all such gap be fixed so that we will only think of using EFCore from that version onward? |
Customers who are migrating EF6 apps to EF Core, is a subset of all the customers of EF Core. There are many people who starts with EF Core, need new features, different providers. Even there exists good amount of customers who migrated their app from EF6 to EF Core. We acknowledge that some customers are not yet able to migrate. We have to provide value to all our customers not just a subset of it. |
Thank you @smitpatel your answer sums it up! |
I don't think there will ever be a release of EF Core that means this expectation. EF Core is a fundamentally different architecture and codebase than EF6, and as such there are always likely to be differences. In particular, when EF6 created very poor translations resulting in a pit-of-failure for anyone using them, it is sometimes better to explicitly not do this in EF Core, but instead block translation such that the LINQ query can be rewritten in a way that can be translated well. This is an ongoing process. where we expect to do better translations each release, and provide better messaging when we can't translate, while not providing pit-of-failure translations. |
Not sure, if the same issue is being tracked with some other Id, but when the below combination of query is executed, the EFCore throws InvalidOperationException as listed below:
Query:
The output of first LINQ (grpQuery):
Exception & Stack Trace: Occurs in the Second LINQ
NOTE: The same query works fine and produces correct SQL in EF6:
Models:
EF Core version: 7.0.0-preview.4.22229.2
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Win 10 Pro
IDE: Visual Studio 2022 v17.0.4
The text was updated successfully, but these errors were encountered: