Can I use Ninject instead of Unity in the MS Application Blocks?

408 Views Asked by At

I am at the early stages of design for a large application. Many of the features will be easier to implement using the Microsoft Enterprise Application Blocks (Caching, Security, Logging). I have in past (for the last two years) used Ninject for my DI needs and was very happy with the ease of use and getting other developers up to speed compared to other DI containers.

Has anybody swapped out the Unity Block for Ninject?

1

There are 1 best solutions below

1
On

If you're using Enterprise Library 5, then there are hooks to plug in whatever DI container you want. Earlier versions do not have those hooks.

The only exception is the Policy Injection block; that one has a hard dependency on Unity.

That being said, I don't know if anyone's written the adapter layer for NInject for ENtlib 5.