2014-09-03 55 views
0

我正在使用web api 2.2 odata v4.0。我有一個控制器有3種方法。例如GetA(),GetB()GetC()
我應該使用哪些代碼,以便我可以從url調用單個方法?
另外,我怎樣才能調用方法GetA()? - 因爲Get()是在ODataController中調用的默認方法。如何在OData中的控制器中調用不同的方法

我使用的代碼,

ODataRoute route = config.Routes.MapODataServiceRoute("odata", "odata",GetModel()); 
route.MapODataRouteAttributes(config); // This line threw an error sowing route does not have the method 
MapODataRouteAttributes() 

請給我建議的解決方案。

感謝

回答

相關問題