Update routing.md (#18448)

pull/18452/head
Rick Anderson 2020-05-22 17:16:21 -10:00 committed by GitHub
parent 497fde5016
commit f5625646b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -272,7 +272,10 @@ The `HomeController.Index` action is run for any of the URL paths `/`, `/Home`,
This example highlights a key programming difference between attribute routing and [conventional routing](#cr). Attribute routing requires more input to specify a route. The conventional default route handles routes more succinctly. However, attribute routing allows and requires precise control of which route templates apply to each [action](#action).
With attribute routing, the controller name and action names play **no** role in which action is matched. The following example matches the same URLs as the previous example:
In the following code:
* The controller name and action names play **no** role in which action is matched.
* Matches the same URLs as the previous example:
[!code-csharp[](routing/samples/3.x/main/Controllers/MyDemoController.cs?name=snippet)]