Reputation: 16125
I want to use this RouteOrder
optional property of [RoutePrefixAttribute]
described here:
http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2#order
In order to resolve ambiguous controller selection problems. The problem is, I can't find such a property at all (no intellisense, doesn't compile)! I'm using
System.Web.Http.RoutePrefixAttribute
from assembly System.Web.Http.dll, v5.2.0.0 (packages\Microsoft.AspNet.WebApi.Core.5.2.0\lib\net45\System.Web.Http.dll)
Is it the wrong one? Or are the docs just wrong?
Upvotes: 1
Views: 746
Reputation: 16125
Only [RouteAttribute]
has the RouteOrder property.
In Web API 2.2 there is no way to set a 'default' RouteOrder for all your controllers route by putting a RouteOrder on your [RoutePrefixAttribute]
.
Upvotes: 0
Reputation: 10628
The RouteOrder
parameter doesn't apply on the RoutePrefix
attribute. It only applies to the Route
attribute.
Upvotes: 2