Skip to content

Add parameter binding documentation #72

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

Merged
merged 3 commits into from
Oct 18, 2021
Merged

Add parameter binding documentation #72

merged 3 commits into from
Oct 18, 2021

Conversation

halter73
Copy link
Collaborator

@halter73 halter73 commented Oct 4, 2021

This guide describes how the sources for parameters in route handlers are determined and how the parameters are initialized.

Fixes #33

@halter73 halter73 changed the title Add Parameter Binding documentation Add parameter binding documentation Oct 4, 2021

### `[FromRoute]`

[FromRouteAttribute](https://docs.microsoft.com/dotnet/api/microsoft.aspnetcore.mvc.fromrouteattribute) implements `Microsoft.AspNetCore.Http.Metadata.IFromRouteMetadata`. Any attribute implementing this interface is equivalent. This will bind the parameter from `HttpRequest.RouteValues[{ParameterName}]`. If the parameter is not a string, the parameter type's [TryParse](#tryparse) method will be called to convert the string to the parameter type.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Once available, I want to link to API docs for the IFrom*Metadata interfaces.

halter73 and others added 2 commits October 5, 2021 20:39
@LadyNaggaga LadyNaggaga merged commit be622cb into main Oct 18, 2021
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.

Parameter binding for route handlers
4 participants