-
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
EFCore 6 - NullReferenceException upon EnsureDeleted #26436
Labels
area-model-building
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
Milestone
Comments
Have you tried the daily build? |
Note for triage: Still repros on "6.0.0-rtm.21519.8". |
@AndriySvyryd Ping; possible patch. |
AndriySvyryd
added a commit
that referenced
this issue
Nov 3, 2021
AndriySvyryd
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Nov 3, 2021
AndriySvyryd
added a commit
that referenced
this issue
Nov 3, 2021
FYI for those impacted by this issue: EF Core 6.0.1 is now available from NuGet. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-model-building
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
I have a sample application which used to work with EFCore 5 sql server provider. But with EFCore 6 rc2, I am getting null reference exception when executing EnsureDeleted().
Here is the sample application
Here is the stacktrace of error
I suppose this is negative scenario since Data Annotation and fluent API used for foreign key are conflicting. But since fluent API takes precedence data annotation, there should not be any error. As it used to work in EFCore 5.
Is this an actual issue or expected behavior.
If this is an issue, when can we expect it to get fixed.
If this is an expected behavior, can we have more meaningful error message instead of null reference exception?
Please could someone clarify.
provider and version information
EF Core version: 6.0.0-rc.2.21480.5
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 preview
The text was updated successfully, but these errors were encountered: