In desktop applications using the model-view-presenter pattern, it's best to use a session for each presenter. This approach can also be adapted to the model-view-view model pattern. More information on these patterns is available at http://en.wikipedia.org/wiki/Model-view-presenter.
In this recipe, I'll show you how to implement this session-per-presenter pattern with dependency injection.
You'll need the named scope extension to Ninject available at http://github.com/remogloor/ninject.extensions.namedscope.
Download the source code in ZIP format and extract it. Open the
Ninject.Extensions.NamedScope.sln solution in Visual Studio and build the solution. Copy