Category Archives: Ninject

Home / ASP.NET / Ninject
4 Posts

Ninject is one of the better dependency injection frameworks, IMHO. However, within the context of .NET Threads and thread pooling, scoping of objects doesn’t work quite as expected.

More Link

Today I ran into an interesting issue. I have a process that uses many database Repositories that are intended to share a DbContext. This is necessary due to a reliance, and desire to use, Entity Framework’s state tracking.

However, once I moved away from working entirely from an HttpContext scope, my Ninject bindings failed me.

More Link

Dependency injection is very useful for decoupling classes from specific implementations. Typically, I use constructor injection with Ninject as my IoC (inversion of control) container. However, I’ve always had to specify interface -> type bindings one by one. It’s very clunky.

More Link