August 2017
Intermediate to advanced
330 pages
7h 26m
English
The ASP.NET Core team has created a bunch of widely used route constraint scenarios based on different data types. The following table lists different route constraints:
|
Constraint Name |
Usage |
Remark |
|
Int |
{id:int} |
The parameter should be an integer |
|
Bool |
{isExists:bool} |
The parameter should be either TRUE or FALSE |
|
Datetime |
{eventdate:datetime} |
Accepts only date time as a parameter |
|
Decimal |
{amount:decimal} |
Accepts only decimal as a parameter |
|
Double |
{weight:double} |
Accepts only double as a parameter |
|
Float |
{distance:float} |
Matches only float as a parameter |
|
Guid |
{id:guid} |
Accepts only GUID as a parameter |
|
Long |
{ticks:long} |
The parameter should be long ... |