开发者

ADO.NET Data Services (OData) for management API

We are using ADO.NET Data Services to expose data from our application.

Whilst I know that I can perform inserts/updates and expose methods on my service, I wondered whether OData is really suited for a management A开发者_开发技巧PI (more functional than data driven)?

For example, we need to be able to manage running instances of our application using a simple API. We are likely to have methods like:

  • GetInstances() - returns list of running instances
  • RestartInstance(string id) - restarts an instance

I would prefer not to use SOAP if possible as I want to be able to work with the API from any client.

Thanks Ben


You can use WCF REST Service, which is action oriented (WCF Data Service is data oriented) and still supports REST invocation which should allow easy enough consumption from any kind of client: http://msdn.microsoft.com/en-us/netframework/cc950529 You could also combine the two, although not in a single endpoint. But you could have one endpoint using WCF Data Services to allow easu querying of the data (maybe even a read-only endpoint) and have another endpoint using WCF REST Service to apply actions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜