Skip to content
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

Undocumented breaking change in ASP.NET Core 7 model binding when using Nullability and model contains generic field #47744

Open
1 task done
johnkors opened this issue Apr 17, 2023 · 0 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates investigate
Milestone

Comments

@johnkors
Copy link

johnkors commented Apr 17, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I guess this is more due to the docs not covering it, but there is a breaking change for how ASP.NET Core 7 handles nullability and Required fields for model binding. It's lacking from this list: https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0

Expected Behavior

Either the same behaviour re model binding between 6 and 7, or the docs listing this specific detail as a breaking change.

Steps To Reproduce

https://github.com/johnkors/aspnetcore7-compat-repro

GitHub actions running the tests in both 6 and 7 is provided, which shows one test running OK in ASP.NET Core 6 but failing in 7.

image

There is a small difference in how nullability and required is handled if the model contains 1 vs more than 1 fields, and the model contains a generic field.

Exceptions (if any)

No response

.NET Version

7

Anything else?

ASP.NET Core 7

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 17, 2023
@MackinnonBuck MackinnonBuck added this to the .NET 8 Planning milestone Apr 17, 2023
@johnkors johnkors changed the title Undocumented breaking change in ASP.NET Core 7 model binding when using Nullability Undocumented breaking change in ASP.NET Core 7 model binding when using Nullability and model contains generic field Apr 26, 2023
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@captainsafia captainsafia modified the milestones: .NET 8 Planning, Backlog Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates investigate
Projects
None yet
Development

No branches or pull requests

4 participants