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.md Minimal APIs quick reference
aspnetcore/fundamentals/minimal-apis/parameter-binding.md Parameter binding in Minimal API applications

@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.

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.

@wadepickett
Copy link
Contributor Author

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.

You are correct Mike thanks, we can consolidate. After comparing versions 7-10 it looks like I can do the following:

  • Keep parameter-binding7.md as a separate file since it represents a significantly different feature set (no form binding support)
  • Consolidate parameter-binding8.md, parameter-binding9.md, and parameter-binding10.md into a single file that covers .NET 8 and above.
  • Same for App samples I think: I will keep the .NET 7 app sample, but consolidate 8-10 to just using a .NET 10 app sample.

@wadepickett
Copy link
Contributor Author

Changed:

After comparing versions 7-10:

Kept parameter-binding7.md as a separate file since it represents a significantly different feature set (no form binding support)
Consolidated parameter-binding8.md, parameter-binding9.md, and parameter-binding10.md into a single file that covers .NET 8 and above (so 8-10+)
Same for App samples, I kept the .NET 7 app sample but consolidate 8-10 to just using a .NET 10 app sample since there is zero difference except the target .NET version.

@wadepickett wadepickett force-pushed the wadepickett/32903IBindableFromHttpContext branch from 601f359 to 286b0e7 Compare October 22, 2025 20:18
@wadepickett wadepickett requested a review from Copilot October 22, 2025 20:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds missing documentation for the IBindableFromHttpContext<T> interface in minimal APIs, which has been available since .NET 7 but was not previously documented. The documentation is being added retroactively to cover versions 7-10.

Key changes:

  • Consolidated parameter binding documentation by merging separate version-specific files (8, 9, 10) into a single shared file covering versions 8-10
  • Added new section documenting the IBindableFromHttpContext interface with examples
  • Created sample applications demonstrating custom parameter binding for both .NET 7 and .NET 10
  • Updated version-specific include references to use the new consolidated file

Reviewed Changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
parameter-binding.md Updated include references to use consolidated version-agnostic file and added ai-usage metadata
parameter-binding8-10.md New consolidated file combining versions 8-10 with added IBindableFromHttpContext section
parameter-binding7.md Added IBindableFromHttpContext documentation for .NET 7
parameter-binding8.md Deleted (consolidated into parameter-binding8-10.md)
parameter-binding9.md Deleted (consolidated into parameter-binding8-10.md)
minimal-apis.md Updated include reference to use consolidated file
minimal-apis8.md Updated include reference to use consolidated file
minimal-apis9.md Updated include reference to use consolidated file
7.0-samples/CustomBindingExample/* New sample application demonstrating IBindableFromHttpContext for .NET 7
10.0-samples/CustomBindingExample/* New sample application demonstrating IBindableFromHttpContext for .NET 10
Comments suppressed due to low confidence (1)

@wadepickett wadepickett requested a review from Copilot October 22, 2025 21:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

@wadepickett wadepickett requested a review from Copilot October 22, 2025 21:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated no new comments.

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.

Looks good! 👍

@wadepickett wadepickett merged commit 41d7c86 into main Oct 23, 2025
3 checks passed
@wadepickett wadepickett deleted the wadepickett/32903IBindableFromHttpContext branch October 23, 2025 03:56
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