- Simple Injector latest version
- Configured using
ScopedLifestyle.Flowing
- Transient services registered as collection
- Those transient services have scoped dependencies
In this context, when the collection is resolved from the Scope it fails when resolved as IEnumerable<T> but succeeds when resolved as T[].
Exception message:
ServiceX is registered using the 'Scoped' lifestyle, but the instance is requested outside the context of an active (Scoped) scope. Please see https://simpleinjector.org/scoped for more information about how apply lifestyles and manage scopes.'
ScopedLifestyle.FlowingIn this context, when the collection is resolved from the
Scopeit fails when resolved asIEnumerable<T>but succeeds when resolved asT[].Exception message: