简体   繁体   English

WCF数据服务,一些问题

[英]WCF Data service, some question

I've two questions on WCF Data service: 关于WCF数据服务,我有两个问题:

-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? -98%的需求由WCF数据服务满足,我只需要一种业务方法,是否可以混合使用WCF数据服务? Or should I create a second WCF service only for this method? 还是应该仅为此方法创建第二个WCF服务?

-Is it possible to host a WCF Data service into an application? -是否可以将WCF数据服务托管到应用程序中? I've a server, and I want that this service is accessible only when the server is launched 我有一台服务器,我希望只有在服务器启动时才能访问此服务

Thank you very much 非常感谢你

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). 您可以将服务操作添加到WCF数据服务中: http : //msdn.microsoft.com/zh-cn/library/cc668788.aspx它们不具有与真正的WCF服务操作相同的功能,但是它们应该能够完成大多数您在这方面的需求(请注意,他们实际上可以返回OData提要/条目供客户使用)。

You can definitely host WCF Data Service in your own application. 您绝对可以在自己的应用程序中托管WCF数据服务。 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". 总体描述在这里: http : //msdn.microsoft.com/zh-cn/library/cc668805(VS.100).aspx ,但是网上有很多示例,只需搜索“主机WCF数据服务” 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM