I have a shared library that uses the Entity Framework (DbContext). This library is used in normal windows applications as well in a web MVC project. I'm using Ninject as DI.

It's my understanding I should be using `InThreadScope` on the `DbContext` for Windows applications and `InRequestScope` for the MVC project.

This however creates some unwanted dependencies. Either my shared library needs a reference to `System.Web` (for request scoping). Or my web project needs a reference to EF (so I can change scope).

Is it possible to setup Ninject in such a way to avoid these dependencies?