Routing

Routing in ASP.NET Core is the process of mapping incoming requests to application logic that resides in controllers and methods.

ASP.NET Core maps the incoming request based on the routes that you configure in your application, and for each route, you can set specific configurations, such as default values, message handlers, constraints, and so on. 

There are a few ways of controlling the routing in an ASP.NET Core application, but in this chapter, we will concentrate on the two most common ways:

  • Conventional routing: The route is determined based on conventions that are defined in route templates that, at runtime, will map requests to controllers and actions (methods).
  • Attribute-based routing: The route is determined based on ...

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.