Skip to content

Commit 2a846fe

Browse files
authored
Fix code format in how-to-implement-dependency-injection.md
1 parent c250c75 commit 2a846fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/guides/implementation-guides/how-to-implement-dependency-injection.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ dotnet add package Microsoft.Extensions.DependencyInjection
7272
The following code is creating an extension method for `IServiceCollection` that will register services to our service collection and make them available for injection.
7373

7474
```csharp
75-
public static class ServiceCollectionExtensions {
76-
public static void AddCommonServices(this IServiceCollection collection) {
75+
public static class ServiceCollectionExtensions
76+
{
77+
public static void AddCommonServices(this IServiceCollection collection)
78+
{
7779
collection.AddSingleton<IRepository, Repository>();
7880
collection.AddTransient<BusinessService>();
7981
collection.AddTransient<MainViewModel>();

0 commit comments

Comments
 (0)