Created
May 24, 2024 19:43
-
-
Save priyankakundu/0325499f5170181d2a626c77feab5d87 to your computer and use it in GitHub Desktop.
Web API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FromQuery] attribute handles query parameters, i.e. key-value pairs coming after "?" in URI. [FromRoute] attribute handles | |
route parameters coming before "?" in URI, i.e. path parameters. | |
For example, if you configured route "orders/{id}", then "id" is your route parameter, and if some actual request is like | |
"orders/123?showHistory=true", then "showHistory" is your query parameter. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment