diff --git a/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs index 2e96791974f..e6edd4ab963 100644 --- a/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs @@ -18,8 +18,6 @@ public static OrchardCoreBuilder AddDataStorage(this OrchardCoreBuilder builder) .ConfigureServices(services => { services.AddScoped(); - services.AddScoped(); - services.AddScoped(); }); return builder; diff --git a/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs b/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs index f917beb9b4c..8af8098218d 100644 --- a/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs +++ b/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs @@ -165,6 +165,8 @@ private static void AddExtensionServices(OrchardCoreBuilder builder) builder.ConfigureServices(services => { services.AddExtensionManager(); + services.AddScoped(); + services.AddScoped(); }); }