Skip to content

Conversation

wadepickett
Copy link
Contributor

@wadepickett wadepickett commented Aug 27, 2025

Fixes #32903

This was missed when it became available clear back in v7. (I did not own that at the time, but jumping in to fix it)

For versions 7-10 of the parameter-binding.md topic:

  • Added new section:
    Custom parameter binding with IBindableFromHttpContext
  • Added a new app sample plus test .http for it.

Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/minimal-apis/parameter-binding.md Parameter Binding in Minimal API apps

@wadepickett wadepickett marked this pull request as ready for review August 27, 2025 17:04
@wadepickett wadepickett requested a review from tdykstra August 27, 2025 17:06
@wadepickett wadepickett self-assigned this Aug 27, 2025
@wadepickett wadepickett requested a review from JamesNK August 28, 2025 15:06
@tdykstra tdykstra changed the title Minimal API responces.md: add missing IBindableFromHttpContext section Minimal API responses.md: add missing IBindableFromHttpContext section Aug 28, 2025
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

I haven't reviewed carefully, but I think at mininum the content needs to move to a different section. Let's work that out first and then flag me to re-review.

@@ -274,6 +274,32 @@ An alternative approach is using the <xref:Microsoft.AspNetCore.Mvc.ProducesAttr

:::code language="csharp" source="~/fundamentals/minimal-apis/9.0-samples/Snippets/Program.cs" id="snippet_11":::

## Custom parameter binding with `IBindableFromHttpContext`
Copy link
Contributor

Choose a reason for hiding this comment

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

This topic is showing up in an article titled "Create responses", but it is about parameter binding. I think this is in the wrong place -- it should appear within the article with the title "Parameter binding".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mikekistler, I moved the new section to the Parameter-binding.md topic, and updated the intro for Custom Binding to include it here: https://review.learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/parameter-binding?view=aspnetcore-10.0&branch=pr-en-us-35999#custom-binding

Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Do we need 4 different sample apps and 4 separate include files for this? I don't think the feature has changed substantially since ASP.NET Core 7 so I think we only need one app and feature description.

Also I think that describing this as "for advanced scenarios" is a bit vague. I think the point of this interface is to avoid the need for reflection and therefore to allow the app to be AOT compatible. If that's correct, I think we should state that explicitly.

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.

Document IBindableFromHttpContext
3 participants