- You can apply multiple constraints to a parameter, separated by a colon.
- Well,It’s like this [Route(“Pet/{petId:int:min(1)}”)]
public class PetController : Controller
{
Key points of the above code
- In the above example,You can’t use /Pet/10000000000 ,because it is larger than int.MaxValue
- And also you can’t use /Pet/0 ,because of the min(1) constraint.
Add comment