unitycontainer/microsoft-dependency-injection

Does this have equivalant to PerRequestLifetimeManager?

UR-ScottShew opened this issue · 3 comments

The older Unity.Mvc library (for .NET Framework) had a PerRequestLifetimeManager that created object instances with the lifetime of one http request.

Unity.Mvc does not run in Asp.Net Core sites. Does this library have equivalent functionality? If so, would it be possible to provide an explanation or code snippet on its usage?

ENikS commented

It does have an HttpContext class, which I believe is equivalent to what Unity.Mvc used. Do you think you could create a PerRequestLifetimeManager?

ENikS commented

I could try in v6, but it might be a while...