Blog: Dependency Management

Avoid wrongly scoped injections with a custom Ninject kernel

October 22, 2015, (updated on February 19, 2016), Software Development

I’m currently working on a large project where different teams implement assemblies which are consumed by other teams. We use Ninject for dependency injection: Each assembly has a Ninject module class which registers the available interface-to-implemenation bindings. At the moment, the consumers of these assemblies just know what module classes to load and what interfaces to inject into own objects like ASP.NET controllers or own service objects, but nothing about the scope of the injected objects. Recently we had some nasty runtime errors, because a consumer of one of these assemblies injected a per-request scoped object into a singleton-scoped object. […] Read more...

Tags: , , , ,


  Page 1 of 1