Skip to content

Scoped services (Func<DbContext>) injection exception with SteroidsDI (Quartz 3.8.0) #2278

Closed Answered by x1cawa
x1cawa asked this question in Q&A
Discussion options

You must be logged in to vote

I'm so sorry. The problem was with SteroidsDI.
I resolved the issue with registering ScopeProvider for SteroidsDI:

services.TryAddEnumerable(ServiceDescriptor.Singleton<IScopeProvider, ScopeProvider>());
...
class ScopeProvider : IScopeProvider
{
    public IServiceProvider? GetScopedServiceProvider(IServiceProvider rootProvider) => rootProvider;
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by x1cawa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants