Multiple Get actions with different attribute routing?
问题 If I design my controller in such a way: public class ItemController : ApiController { [HttpGet] [RoutePrefix("item/dosomething")] public void DoSomething(Item item) { } [HttpGet] [RoutePrefix("item/dosomethingnicer")] public void DoSomethingNicer(Item item) { } [HttpGet] [RoutePrefix("item/dosomethingelse")] public void DoSomethingElse(Item item) { } } Would this work? 回答1: I would expect a structure more akin to this: [RoutePrefix("item")] public class ItemController : ApiController {