- To that you can specify adefault value to the route parameter
- It's like this : [Route("Pet/Breed/{petKey=123}")]
PetController.cs
public class PetController : Controller
{
// eg: /Pet/Breed
// eg: /Pet/Breed/528
[Route("Pet/Breed/{petKey=123}")]
public ActionResult GetSpecificPet(string petKey)
{
return View();
}
}