diff --git a/docs/guides/implementation-guides/how-to-implement-dependency-injection.md b/docs/guides/implementation-guides/how-to-implement-dependency-injection.md index 164746773..a847c6b65 100644 --- a/docs/guides/implementation-guides/how-to-implement-dependency-injection.md +++ b/docs/guides/implementation-guides/how-to-implement-dependency-injection.md @@ -72,8 +72,10 @@ dotnet add package Microsoft.Extensions.DependencyInjection The following code is creating an extension method for `IServiceCollection` that will register services to our service collection and make them available for injection. ```csharp -public static class ServiceCollectionExtensions { - public static void AddCommonServices(this IServiceCollection collection) { +public static class ServiceCollectionExtensions +{ + public static void AddCommonServices(this IServiceCollection collection) + { collection.AddSingleton(); collection.AddTransient(); collection.AddTransient();