Yes, they are the same. I followed the same article and I ran into this problem ( RouteOrderdoes not exist in System.Web.Http.RouteAttribute).
I did a quick test in my Web API 2 application to verify:
[Route("{name}")]
[HttpPost]
public string Test(string data) {
return data;
}
[Route("preview")]
[HttpPost]
public string Preview(string data) {
return data;
}
api/preview Fiddler, Preview() , . , :
[Route("preview"), Order = 1]
[HttpPost]
public string Preview(string data) {
return data;
}
api/preview, Test(), RouteOrder. , , !