API

int route constraint

Matches an integer route segment during route selection.

Formal Syntax & Structure

csharp syntaxcsharp
"/books/{id:int}"

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context."/books/{id:int}"
C# & .NET Reference