From 1a430f90ed1ad7d01ca0352bb63c84432e3818e9 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Fri, 14 Mar 2014 13:06:27 -0700 Subject: [PATCH] porting to web sample --- samples/MvcSample/Startup.cs | 4 ++++ src/Microsoft.AspNet.Mvc/MvcServices.cs | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/MvcSample/Startup.cs b/samples/MvcSample/Startup.cs index 13bb0928c9..909ef0cefe 100644 --- a/samples/MvcSample/Startup.cs +++ b/samples/MvcSample/Startup.cs @@ -37,6 +37,10 @@ namespace MvcSample AutofacRegistration.Populate(containerBuilder, _serviceProvider, services); containerBuilder.RegisterInstance(new PassThroughAttribute()); + // This is only needed in the selfhost sample - there's no need to port this to the web sample, since + // it's provided by default there. + containerBuilder.RegisterType().As(); + // Temporary until we have support for open generics in our DI system. containerBuilder.RegisterGeneric(typeof(NestedProviderManager<>)).As(typeof(INestedProviderManager<>)); containerBuilder.RegisterGeneric(typeof(NestedProviderManagerAsync<>)).As(typeof(INestedProviderManagerAsync<>)); diff --git a/src/Microsoft.AspNet.Mvc/MvcServices.cs b/src/Microsoft.AspNet.Mvc/MvcServices.cs index 9b8d94e1a9..1265e3158a 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServices.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServices.cs @@ -20,8 +20,6 @@ namespace Microsoft.AspNet.Mvc { var describe = new ServiceDescriber(configuration); - yield return describe.Transient(); - yield return describe.Transient(); yield return describe.Transient(); yield return describe.Transient();