Route Template

noun

say it: “ROWT TEM-plit” /raʊt ˈtɛmplɪt/

A URL pattern with placeholders, such as {controller}/{action}/{id?}, that maps addresses to actions.

What is Route Template?

A route template is a URL pattern with placeholders and optional constraints, like /recipes/{id:int} or /files/{**path}.

app.MapGet("/decks/{category}/{level:int:range(1,5)}", GetDeck);

In a sentence

  • “The route template products/{id} sends /products/7 to the Details action with id 7.”

Level: Apprentice · More ASP.NET Core terms at this level

Updated