ASP.Net WebAPI area support

后端 未结 5 2299
庸人自扰
庸人自扰 2020-12-02 22:49

I am trying to add some WebAPI support to my asp.net 4 RC site, and wish to put it into an area. I have seen that someone managed to get this running on the beta (here) ,

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 23:20

    Just for completion, the following attributes exists, which could help people out of a bind (who won't follow eric's advice above...)

    [Route ("api/interesting/{id?}")]
    [RoutePrefix("api/interesting")]
    

    http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2

提交回复
热议问题