We use URLs (Uniform Resource Locators) to access code resources on the web. For example, when you see a request for www.dummysite.com/pages/profile.aspx, it's very easy to infer that profile.aspx physically exists in the pages folder on the website, dummysite.com.
Notice that the URL and the physical file in our example have a direct relationship--when a request is received by the web server for this file, the code gets executed, and the response is returned to be displayed on the browser.
When working with MVC-based frameworks like ASP.NET Core, the URL maps to controller classes and its action methods using an approach known as Routing.
In this chapter, we will look at the following topics:
- Introducing Routing
- Routing middleware
- Route Builder
- Convention-based and template-based Routing
- Attribute-based routes
- Route constraints
- Link generation
- Best...