Multiple actions were found that match the request Web API?

后端 未结 8 1195
再見小時候
再見小時候 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:14

    I hope you are doing HttpGet while you invoke GetFilteredCeremonies(Search filter)

    In that case, you cannot pass complex object in GET request like Search that you are passing.

    If for some reason, you definitely want to get complex types in your get request, there are some work around. You may need to write a custom model binder and then set the attribute. please refer this article.

提交回复
热议问题