我想使用这里描述[RoutePrefixAttribute]此RouteOrder可选属性: http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2#order 为了解决暧昧控制器选择问题。问题是,我根本找不到这样的属性(没有智能感,不会编译)!我使用 System
我在现有的MVC 5项目中使用带有属性路由的WebAPI 2.2。我打算将整个网站迁移到WebAPI,但这需要一些时间。我有一切工作,但我担心我可能做错了什么。 This SO post seems to suggest I should be calling GlobalConfiguration.Configure(WebApiConfig.Register) in the Global.as
我有一个非常基本的WebApi控制器,如下所示,它使用属性路由。 public class ValueController : ApiController
{
//This route returns a 404
[Route("api/v1/values")]
public Value GetValue()
{
return new Valu