Web API routing with multiple parameters

后端 未结 2 1693
暖寄归人
暖寄归人 2021-01-31 16:45

I\'m trying to work out how to do the routing for the following Web API controller:

public class MyController : ApiController
{
    // POST api/MyController/GetA         


        
2条回答
  •  不要未来只要你来
    2021-01-31 17:02

    The problem is your api/MyController/GetRowsOfType/userName/tableName/rowType URL will always match the first route so the second is never reached.

    Simple fix, register your RowsByType route first.

提交回复
热议问题