Fix #4998 - Change lifetime of ViewComponentResultExecutor

This service has a scoped dependency so it should be scoped or transient.
This commit is contained in:
Ryan Nowak 2016-07-19 15:25:47 -07:00
parent fb514d7ef8
commit 85ca3e4976
1 changed files with 1 additions and 1 deletions

View File

@ -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>();