Looking at the help Attribute Routing in ASP.NET MVC 5 it is easy to see how to constraint a parameter as below:
[Route("edit/{promoId:int?}")]
public ActionResult Edit(int? promoId) { … }
So this route will only accept promoId with int values or empty.
Some valid URLs for this route would be:
/promotions/edit/5
/promotions/edit/
But how to set a RouteAttribute to accept "/promotions/edit/promoId=5"?