WCF数据服务,一些问题
我对 WCF 数据服务有两个问题:
-98% 的需求都由 WCF 数据服务满足,我只需要一种业务方法,是否可以混合使用 WCF 数据服务?或者我应该仅为此方法创建第二个 WCF 服务?
- 是否可以将 WCF 数据服务托管到应用程序中?我有一台服务器,我希望只有在服务器启动时才能访问该服务
非常感谢
I've two questions on WCF Data service:
-98% of my needs are covered by the WCF Data service, I only need one business methods, is it possible to mix a WCF Data service? Or should I create a second WCF service only for this method?
-Is it possible to host a WCF Data service into an application? I've a server, and I want that this service is accessible only when the server is launched
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将服务操作添加到 WCF 数据服务:http://msdn.microsoft。 com/en-us/library/cc668788.aspx
它们不具有与真正的 WCF 服务操作相同的功能,但它们应该满足您在该领域的大部分需求(请注意,它们实际上可以返回 OData 提要/条目以供客户端使用)。
您绝对可以在自己的应用程序中托管 WCF 数据服务。总体描述如下:http://msdn.microsoft。 com/en-us/library/cc668805(VS.100).aspx,但是网上有很多示例,只需搜索“host WCF Data Service”即可。
You can add service operations to your WCF Data Service: http://msdn.microsoft.com/en-us/library/cc668788.aspx
They don't have the same power as true WCF Service operations, but they should fullfil most of your needs in this area (note that they can actually return OData feeds/entries for the client consumption).
You can definitely host WCF Data Service in your own application. The overall description is here: http://msdn.microsoft.com/en-us/library/cc668805(VS.100).aspx, but there are bunch of samples around the web, just search for "host WCF Data Service".