Skip to content

Configurable Scoped registration mapper #90

Description

@jgasiorowski

I am using this library to configure services on IServiceCollection and then transfer registrations to IUnityContainer by using .BuildServiceProvider(IUnityContainer ...) extension method.
Currently I am trying to use it on Asp Net MVC (old) project and there is only a problem with Scoped registrations which gets mapped to HierarchicalLifetimeManager which in such configuration works like a singleton.
I saw some issues about usage of PerRequestLifetimeManager like #84 which looks like solution would be complex, but I was wondering if there could be some setting exposed where we could configure mapping for Scoped registration? If that would be simple lambda then we could just return PerRequestLifetimeManager instance if hosting application is legacy MVC project

case ServiceLifetime.Scoped:

Is there any chance that this is a good idea?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions