-
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
Scaffolding: nullablility annotation issues #19496
Comments
cc: @roji |
Thanks. You're right that there's an issue: GetValueOrDefault is indeed marked to return nullable (with the MaybeNull attribute), and so it's weird that on my machine and on the CI tableName could be passed to DisplayName without a warning. This is somehow related to the GroupBy being performed over the tableName, which somehow makes the compiler regard it as non-nullable. Any chance you're using a different VS (or especially dotnet SDK) to build, explaining the behavior difference? Are other people on the team also seeing this with VS (or anything else)? |
VS Int Preview 16.5.0 Preview 2.0 29703.146.master |
That only surface in preview versions of VS. Fixes #19496
That only surface in preview versions of VS. Fixes #19496
That only surface in preview versions of VS. Fixes #19496
That only surface in preview versions of VS. Fixes dotnet#19496
My VS build currently fails with this
Source of confusion is this
https://github.com/aspnet/EntityFrameworkCore/blob/e2ba1c8dab28db719f7a58cacba98dabc23390a7/src/EFCore.SqlServer/Scaffolding/Internal/SqlDataReaderExtension.cs#L41-L48
The file is marked as nullable enable so my understanding is
T
is non-null but then it does not match annotation on method. On the other hand if this method can return null then it is being used to pass argument to a method which does not accept null.The text was updated successfully, but these errors were encountered: