HttpGet [FromQuery] Model binding fails in case of propertity with the same name #57637
Open
1 task done
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Is there an existing issue for this?
Describe the bug
Model binding fails when a [FormQuery] parameter has the same name as a property of the model.
HTTP GET /test?Parameter=test
Looks like it's related to here
aspnetcore/src/Mvc/Mvc.Core/src/ModelBinding/ParameterBinder.cs
Line 121 in c4601ad
When the name of the model is the same as the model attribute name, the binding intention cannot be easily determined by the prefix
Expected Behavior
HTTP GET /test?Parameter=test
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
9.0.100-preview.7.24407.12
Anything else?
No response
The text was updated successfully, but these errors were encountered: