Have a couple of questions regarding the latest version (2.2.1.4) of ninject.
Was trying to Bind a Linq2sql DataContext
to a concrete implementation InRequestScope
(in a class library project)
Bind<DataContext>().To<MoneywatchDataContext>()
but could not find InRequestScope
method
ended up doing this,
Bind<DataContext>().To<MoneywatchDataContext>().InScope(ctx => HttpContext.Current)
Just wanted to find out if:
InRequestScope
Method.HTTContext.Current
is GC'ed the underlying DataCotext
will be disposed as well. InRequestScope is available as extension method in Ninject.Web.Common. So if installed earlier through Nuget (Ninject package) now we might need to install additional nuget package Ninject.Web.Common