From 0e2aec4ae2e07424007ef173577a3cb365b838ec Mon Sep 17 00:00:00 2001 From: Travis Illig Date: Thu, 18 Aug 2016 05:50:04 -0700 Subject: [PATCH] Updates to Autofac references, samples for RTM (#1793) --- aspnet/fundamentals/dependency-injection.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnet/fundamentals/dependency-injection.rst b/aspnet/fundamentals/dependency-injection.rst index daf3e86884..70f2c9d4aa 100644 --- a/aspnet/fundamentals/dependency-injection.rst +++ b/aspnet/fundamentals/dependency-injection.rst @@ -183,8 +183,8 @@ First, add the appropriate container package(s) to the dependencies property in .. code-block:: javascript "dependencies" : { - "Autofac": "4.0.0-rc2-237", - "Autofac.Extensions.DependencyInjection": "4.0.0-rc2-200" + "Autofac": "4.0.0", + "Autofac.Extensions.DependencyInjection": "4.0.0" }, Next, configure the container in ``ConfigureServices`` and return an ``IServiceProvider``: @@ -202,7 +202,7 @@ Next, configure the container in ``ConfigureServices`` and return an ``IServiceP containerBuilder.RegisterModule(); containerBuilder.Populate(services); var container = containerBuilder.Build(); - return container.Resolve(); + return new AutofacServiceProvider(container); } .. note:: When using a third-party DI container, you must change ``ConfigureServices`` so that it returns ``IServiceProvider`` instead of ``void``.