Sign in to track progress and bookmarks.
Typically used for pagination, filtering, and optional parameters. /Products?id=123. Values are optional.
Used to identify a specific record in a RESTful manner. /Products/123/Details. If the route parameter is missing, the request fails (404).
A 12-year expert knows that sometimes the best data is in a Header (e.g. api-version) or passed directly from the DI container into the action method without hitting the constructor ([FromServices]).
For cases like custom encrypted tokens or non-standard date formats, you can create an IModelBinder. This is the ultimate tool for clean, professional controllers that don't deal with parsing "Garbage Strings".
Quizzes linked to this course—pass to earn certificates.
On this page
1. [FromQuery] (The Search & Filter Source) 2. [FromRoute] (The Immutable Resource Source) Advanced: [FromHeader] & [FromServices]