更新时间:2023-02-15 12:38:30
如果您不是必须使用使用 api/{controller}/{id}
路由的 REST 服务并尝试根据方法GET/POST/DELETE/PUT解析动作,你可以将你的路由修改为经典的MVC路由到 api/{controller}/{action}/{id}
它将解决您的问题.
If you're not requirement bound to use REST services that use api/{controller}/{id}
route and attempt to resolve action based on method GET/POST/DELETE/PUT, you can modify your route to classic MVC route to api/{controller}/{action}/{id}
and it will solve your problems.