diff --git a/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs index f77364fa6f..3f50f69fe0 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs @@ -41,13 +41,11 @@ namespace Microsoft.Framework.DependencyInjection services.AddOptions(configuration); services.AddDataProtection(configuration); services.AddRouting(configuration); - services.AddScopedInstance(configuration); services.AddAuthorization(configuration); services.Configure(routeOptions => routeOptions.ConstraintMap .Add("exists", typeof(KnownRouteValueConstraint))); - } } } diff --git a/src/Microsoft.AspNet.Mvc/MvcServices.cs b/src/Microsoft.AspNet.Mvc/MvcServices.cs index 49a247c7ec..425d946b86 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServices.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServices.cs @@ -37,6 +37,7 @@ namespace Microsoft.AspNet.Mvc typeof(INestedProviderManagerAsync<>), typeof(NestedProviderManagerAsync<>)); yield return describe.Transient(); + yield return describe.Scoped(typeof(IScopedInstance<>), typeof(ScopedInstance<>)); // Core action discovery, filters and action execution.