문제

The excellent sample code: Support Composite Key in ASP.NET Web API OData illustrates how to create routing conventions to make WebApi OData work with composite keys.

However it is using ODataController (as one of the unanswered discussions on the sample code mentions) which I presume has many downsides (which I am yet to fully uncover)... has anyone created an example using the benefits of EntitySetController?

도움이 되었습니까?

해결책

Going forward the recommended approach is to directly derive from ODataController. Visual Studio 2013 provides scaffolding for creating OData services based on ODataController. This has been found to be a much more flexible model than deriving from EntitySetController. You get complete control over what is done in your actions.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top