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

Make note that the example here will not work with minimal api #26538

Closed
DrewBrasher opened this issue Jul 25, 2022 · 1 comment · Fixed by #26537
Closed

Make note that the example here will not work with minimal api #26538

DrewBrasher opened this issue Jul 25, 2022 · 1 comment · Fixed by #26537
Assignees
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@DrewBrasher
Copy link

It would be helpful if this page had a note that the example only works with a controller api because the minimal API does not natively support binding from form values (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0#explicit-parameter-binding).

This Stack Overflow answer has some was to do it with minimal api: https://stackoverflow.com/questions/71047077/net-6-minimal-api-and-multipart-form-data#answer-71048827


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added Blazor Source - Docs.ms Docs Customer feedback via GitHub Issue labels Jul 25, 2022
@guardrex guardrex self-assigned this Jul 25, 2022
@guardrex
Copy link
Collaborator

guardrex commented Jul 25, 2022

Thanks @DrewBrasher ... Yes, I think that's going to be a .NET 7 feature released later this year (or now via preview).

I think I'll try to work this into the first round of .NET 7 Blazor updates:

  • Place a NOTE for the 6.0 version of this doc.
  • No comment for the 7.0 version of the doc, since it doesn't show the Minimal API approach and will bind from a form (in theory 🤞🍀) if a dev converts the controller code over on their own (we won't show that).
  • No comment for the 5.0 version, as Minimal APIs were a 6.0 or later thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants