microsoft-dependency-injection
microsoft-dependency-injection copied to clipboard
Does this have equivalant to PerRequestLifetimeManager?
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?
It doesn’t have a manager like that. I am pretty sure it could be created if asp.net has session object that can be observed
It does have an HttpContext class, which I believe is equivalent to what Unity.Mvc used. Do you think you could create a PerRequestLifetimeManager?
I could try in v6, but it might be a while...