In Chapter 1, Getting Ready, we acknowledged the fact that the ASP.NET Core pipeline has been completely rewritten in order to merge the MVC and WebAPI modules into a single, lightweight framework to handle both worlds. Although this certainly is a good thing, it comes with the usual downside that we need to learn a lot of new stuff. Handling routes is a perfect example of this, as the new approach defines some major breaking changes from the past.
The first thing we should do is give out a proper definition of what routing actually is.
To cut it simple, we could say that URL routing is the server-side feature that allows a web developer to handle HTTP requests pointing to URIs not mapping to physical files. Such techniques could be used for a number of different reasons, including the following:
Giving dynamic pages semantic, meaningful, and human-readable names in order to advantage readability and/or search-engine optimization (SEO)
Renaming or moving...