Routing bridges middleware and MVC framework by mapping incoming Http requests into controller action method. There are two different routing available in MVC.

Routes are evaluated in the order they are defined in the program. The more important routes should be defined first.
Following diagram explain the login flow of routing mechanism in Asp.Net core MVC. core mvc routing high level overview

1. Conventional routing

This type of routing uses application wide patterns to match a URL to a controller action method.
Conventional routing is registered during startup and consumed by middleware.
Routes are given a template URL that has placeholders that map to URL segments and values.
can also configure to use default values, constraints and other options.


app.UseMvc(routes => {
    name: "default",
    template: "{controller=Home}/{action=Index}/{id?}"

2. Attribute routing

This type of routing is implemented through Attributes applied directly to a Controller or Action Method.