2016-07-12 60 views

回答

0

設置你的配置使用屬性路由。

public static class WebApiConfig 
{ 
    public static void Configure(HttpConfiguration configuration) 
    { 
     //the following config sets up your routing mechanism to use attributes 
     configuration.MapHttpAttributeRoutes(); 
    } 
}