需要WCF的完整DI样本 [英] Need complete DI sample for WCF

查看:61
本文介绍了需要WCF的完整DI样本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人对WCF有完整且有效的DI示例吗?

Does anyone have a complete and working DI sample for WCF?

每个 示例 找到只会让我更加困惑。有谁知道可以与内置东西一起使用的完整且可运行的独立简单示例?

Every sample I find just gets me more confused. Does anyone know of a complete and working standalone simple sample that works with the built in stuff?

也许一旦我掌握了内置的东西,我就可以继续使用不同的DI框架,例如StructureMap或带有WCF的Unity。

Maybe once I get a handle of the built in stuff, I can move on to different DI frameworks such as StructureMap or Unity with WCF.

我的MVC项目当前正对其所有DI使用Unity。

My MVC project is currently using Unity for all its DI.

推荐答案

我的书。NET中的依赖注入包含完整的有效示例。

The code download for my book Dependency Injection in .NET contains a full, working example.

但是,您将要做的大多数此答案中说明了需要知道的内容:将数据注入到WCF服务中

However, most of what you'll need to know is explained in this answer: Injecting data to a WCF service

这篇关于需要WCF的完整DI样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆