Routing in ASP.NET Core

Routing in ASP.NET Core: Conventional and Attribute Routing, Route Values and the Query String.

Updated

  1. Conventional and Attribute Routing (Journeyman): Conventional routing builds every address from one pattern; attribute routing gives each action its own address with [Route] and [HttpGet]. Constraints such as {id:int} decide which addresses match.
  2. Route Values and the Query String (Journeyman): Values reach an action from the route (/products/7) or the query string (?page=2). Choose which with the address's meaning, give optional values defaults, and use [FromRoute] and [FromQuery] to be explicit.