-
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: Enable nullable on the project #24265
Conversation
src/EFCore/Internal/InternalDbSet.cs
Outdated
@@ -173,7 +173,7 @@ public override LocalView<TEntity> Local | |||
/// any release. You should only use it directly in your code with extreme caution and knowing that | |||
/// doing so can result in application failures when updating to a new Entity Framework Core release. | |||
/// </summary> | |||
public override TEntity Find(params object[] keyValues) | |||
public override TEntity? Find(params object[]? keyValues) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it useful to allow the user to pass null here when we'll always just return null? Is there some reason to keep this (apart from the brekaing change)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converted to object?[]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving it as unresolved if someone else know reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should throw in the real DbSet if the array is null. (Or, indeed, if any of its values are null.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We return null right now. A real DbSet passes off to EntityFinder and it returns null currently rather than throw.
6f5b829
to
563503a
Compare
src/EFCore.Relational/Metadata/Conventions/SharedTableConvention.cs
Outdated
Show resolved
Hide resolved
dba8ce0
to
3cb3ea7
Compare
Part of #19007 Left nullable enable to make review easier. Can replace all those with regex once we are done with all projects
873a4f3
to
28d01a3
Compare
Also incorporated feedback from previous PR. |
Hello @smitpatel! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Part of #19007
Left nullable enable to make review easier. Can replace all those with regex once we are done with all projects