Multiple actions were found that match the request Web API?

后端 未结 8 1177
再見小時候
再見小時候 2020-12-09 08:09

I am using web API and i am new in this. I am stuck in a routing problem. I have a controller with following actions :

    // GET api/Ceremony
    public IEn         


        
8条回答
  •  囚心锁ツ
    2020-12-09 09:03

    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.

提交回复
热议问题