-
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
ArgumentNullException on query that worked in EF 6 #15302
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
Comments
Gaz83
changed the title
ArgumentNullException
ArgumentNullException on query that worked in EF 6
Apr 10, 2019
ok so I got the query working by changing UpperLimit = y.StepNumericlimit1.FirstOrDefault().StepNumericlimit2.FirstOrDefault().HighLimit.ToString() to this UpperLimit = y.StepNumericlimit1.Select(z => z.StepNumericlimit2.FirstOrDefault().HighLimit).FirstOrDefault().ToString() |
Query falls into client eval for projection. And |
smitpatel
added
the
verify-fixed
This issue is likely fixed in new query pipeline.
label
Mar 16, 2020
maumar
added
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
and removed
verify-fixed
This issue is likely fixed in new query pipeline.
labels
Oct 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Note sure if this issue is classed as the same as the currently open one here Issue 12603
So I have converted an application from wpf and EF6 to .net core 3 and EF core and
I have a query that seemed to work fine in EF 6 but gives me a ArgumentNullException
in EF core.
The annoying thing is that I tried creating a new app and a new database, stripping out tables and columns that are not required by the query, just so I could try and recreate the issue. Query works fine in this new recreated app, although the database only contains 2 records in each table.
Here is the query code.
The exception is on this line, because if I comment it out then the query runs fine.
I assumed it was because StepNumericlimit1 could be null or StepNumericlimit2 could be null, but in the new dummy database I made sure these null conditions were there i.e. I made sure there was 1 StepNumericlimit1 with 0 child StepNumericlimit2, and it still worked.
Further technical details
EF Core version: 2.2.4
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual studio 2019
EF Code files - scaffold generated files.
EFCode_NonWorking.zip
EFCode_Working.zip
The text was updated successfully, but these errors were encountered: