Can someone direct me to a good example of Unity Dependency Injection for WCF services? Any blog or msdn article will also help.
A:
To inject dependencies into WCF services I had to implement a service host factory.
I have found a step-by-step tutorial here
onof
2010-09-21 20:39:55
Is that the best one? I have already looked at it, and it looks complicated. Anything simpler than that??
SVI
2010-09-21 20:41:44
A:
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 :)
Mark Seemann
2010-09-22 11:37:58
or you mean just ignore Unity and go with Windsor. You'd be better off altogether.
Krzysztof Koźmic
2010-10-05 09:41:44