Fix #4998 - Change lifetime of ViewComponentResultExecutor
This service has a scoped dependency so it should be scoped or transient.
This commit is contained in:
parent
fb514d7ef8
commit
85ca3e4976
|
|
@ -140,7 +140,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
services.TryAddSingleton<
|
||||
IViewComponentDescriptorCollectionProvider,
|
||||
DefaultViewComponentDescriptorCollectionProvider>();
|
||||
services.TryAddSingleton<ViewComponentResultExecutor>();
|
||||
services.TryAddTransient<ViewComponentResultExecutor>();
|
||||
|
||||
services.TryAddSingleton<ViewComponentInvokerCache>();
|
||||
services.TryAddTransient<IViewComponentDescriptorProvider, DefaultViewComponentDescriptorProvider>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue