WCF 数据服务和温莎城堡
我正在尝试将温莎城堡与 WCF 数据服务一起使用。我创建了一个名为“Person”的实体数据模型,并添加了一个名为“MyService.svc”的 WCF 数据服务。然后通过 OData 公开...
public class MyService: DataService<Person>
...
现在的问题是在注册后如何使用 Windsor 容器解决这个问题? (我通过 Global.asax 注册的)。因此,当您发出诸如“http://localhost/MyService.svc”之类的请求时,我该如何处理解析“MyService”实例?我如何以及在哪里拦截以提供 Windsor 容器的实例?
I am trying to use the Castle Windsor with WCF Data Service. I have created an Entity Data Model say "Person" and added a WCF Data Service called "MyService.svc". This is then exposed through OData...
public class MyService: DataService<Person>
...
Now, the question is how do you go about resolving this using the Windsor Container after registering it? (I registered it through Global.asax). So when you make a request such as "http://localhost/MyService.svc", How do I go about resolving "MyService" instance? How and where could I intercept to provide an instance from Windsor container?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这些链接。您必须添加一些类才能连接到服务工厂。这些示例适用于 Unity,但我轻松地针对温莎城堡修改了它们:
http ://initializecomponent.blogspot.com/2008/06/integrating-unity-with-wcf.html
http://initializecomponent.blogspot.com/2008/06/unity-wcf-and-iis.html
Have a look at these links. You have to add a few classes to hook in to the service factory. These examples are for Unity but I easily modified them for Castle Windsor:
http://initializecomponent.blogspot.com/2008/06/integrating-unity-with-wcf.html
http://initializecomponent.blogspot.com/2008/06/unity-wcf-and-iis.html