From a06040383699cd1e711237ca9e5b21284d936a2d Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 31 Mar 2022 17:06:50 -1000 Subject: [PATCH] Update dependency-injection.md (#25482) --- aspnetcore/fundamentals/dependency-injection.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/aspnetcore/fundamentals/dependency-injection.md b/aspnetcore/fundamentals/dependency-injection.md index d4e7ce1d25..3caf78bc5d 100644 --- a/aspnetcore/fundamentals/dependency-injection.md +++ b/aspnetcore/fundamentals/dependency-injection.md @@ -94,12 +94,6 @@ The framework provides a robust [logging](xref:fundamentals/logging/index) syste Using the preceding code, there is no need to update `Program.cs`, because [logging](xref:fundamentals/logging/index) is provided by the framework. -## Services injected into Program.cs - -Any service registered with the DI container can be resolved from `app.Services` in `Program.cs`: - -[!code-csharp[](dependency-injection/samples/6.x/DependencyInjectionSample/Program.cs?name=snippet1)] - ## Register groups of services with extension methods The ASP.NET Core framework uses a convention for registering a group of related services. The convention is to use a single `Add{GROUP_NAME}` extension method to register all of the services required by a framework feature. For example, the extension method registers the services required for MVC controllers.