Interface Type Return Value Explanation WebApi

Original Address: http://www.cnblogs.com/landeanfen/p/5501487.html

Constrained routing associated attributes, default reference
alpha, must case letters (az, AZ), such as: {X: Alpha};
BOOL, must be a Boolean value, such as: {X: BOOL}
datetime, must be the DateTime (time and date) type, such as: {X: datetime}
decimal, must decimal type, such as: {X: decimal}
Double, must 64bit floating point, such as: {X: Double}
a float, must be a 32bit floating point, such as : {X: a float}
GUID, the GUID is necessary, such as: {X: GUID}
int, must 32bit integers, such as: {X: int}
, string length must specify a value within a specified range or length, such as: X {: length (. 6) {X}: length (1,20)}
Long, must 64bit integers, such as: {X: Long}
max, an integer less than the specified value, such as: {x: max (10) }
MAXLENGTH, the string length is less than the specified value, such as: {X: MAXLENGTH (10)}
min, an integer equal to an integer greater than the specified value, such as: {X: min (10)}
minLength, string length is greater than the specified value , such as: {x: minLength (10)}
range, must be an integer within a given range, such as: {x: range (10,50)}
REGEX, must match the regular expression, such as: {x: (^ \ d {3} - \ d {3} - \ d {4} $)}

Guess you like

Origin www.cnblogs.com/eimers/p/12090187.html