Unity Dependency Injection for WCF services
问题 Can someone direct me to a good example of Unity Dependency Injection for WCF services? Any blog or msdn article will also help. 回答1: This answer gives an example on how to enable DI in WCF with Castle Windsor. Just replace the IWindsorContainer with an IUnityContainer in the example and you should be all set, although you may also want to change the class names from WindsorXyz to UnityXyz :) 回答2: To inject dependencies into WCF services I had to implement a service host factory. I have found