0
我們一直在使用mvc webapi beta並試圖升級到rc。升級到mvc4後,在控制器上發現了多個操作rc
我們有以下途徑(唯一的限制是爲了驗證(編號)是一個整數):
"Api Verb with SubAction" api/{controller}/{id}/{action}
"Api Verb with Id" api/{controller}/{id}
"Api Verb without Id" api/{controller}
"Api Action with Id" api/{controller}/{action}/{id}
"Api Action without Id" api/{controller}/{action}
而下面的控制器操作
public IList<PaymentMethodViewModel> GetList()
{}
public HttpResponseMessage Get(Guid id)
{}
[ActionName("Details")]
public IList<RecurrenceModel> GetDetails(Guid id)
{}
API/myController的,API/myController的/ 1,api/mycontroller/1 /所有細節都在測試版中正確返回。但是,在升級到MVC4 RC api/mycontroller/1之後,api/mycontroller/1/details會返回「找到與請求匹配的多個操作:」