Skip to content

Document MVC and form-mapping differences - #37529

Merged
guardrex merged 3 commits into
mainfrom
halter73-document-form-mapping-attributes
Aug 25, 2026
Merged

Document MVC and form-mapping differences#37529
guardrex merged 3 commits into
mainfrom
halter73-document-form-mapping-attributes

Conversation

@halter73

@halter73 halter73 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Documents that Minimal API and Blazor form mapping don't honor MVC model-binding attributes such as [BindNever] and [BindRequired].

Summary

  • Adds warnings next to complex form-mapping guidance for Minimal APIs and Blazor.
  • Recommends dedicated input models or DTOs to mitigate overposting.
  • Clarifies form-mapping terminology in the Minimal API guidance.

Files changed

  • aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md: Documents unsupported MVC model-binding attributes and the recommended mitigation.
  • aspnetcore/fundamentals/minimal-apis/parameter-binding.md: Updates article metadata.
  • aspnetcore/blazor/forms/binding.md: Adds discoverable form-mapping attribute guidance and links to the existing overposting guidance.

Internal previews

File Preview link
aspnetcore/blazor/forms/binding.md aspnetcore/blazor/forms/binding
aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@halter73
halter73 requested a review from guardrex as a code owner August 25, 2026 03:11
@halter73
halter73 requested a review from javiercn August 25, 2026 03:11
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@wadepickett
wadepickett self-requested a review August 25, 2026 04:15

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halter73, Approved. Looks good. I will wait on merging since you also asked some other folks to take a look.

@guardrex guardrex left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left suggestions to cross-link the namespace with the full name as link text.

Comment thread aspnetcore/blazor/forms/binding.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md Outdated
@guardrex

Copy link
Copy Markdown
Collaborator

@halter73 @wadepickett ... For the Blazor article remarks, that doesn't seem like the best spot/approach for coverage. There's a dedicated section on [SupplyParameterFromForm] at Supply a parameter from the form ([SupplyParameterFromForm]). Shouldn't this be documented in that section with the remarks on that API? It also wouldn't need to be a NOTE in that position.

Comment thread aspnetcore/blazor/forms/binding.md Outdated

@javiercn javiercn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I wouldn't call it limitations but differences.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@halter73 halter73 changed the title Document MVC attribute limitations in form mapping Document MVC and form-mapping differences Aug 25, 2026
@guardrex
guardrex merged commit 693af88 into main Aug 25, 2026
5 checks passed
@guardrex
guardrex deleted the halter73-document-form-mapping-attributes branch August 25, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants