Skip to content

Commit f6cdc6e

Browse files
authored
Follow-up link and grammar updates (#36779)
1 parent 762e79d commit f6cdc6e

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

aspnetcore/fundamentals/dependency-injection.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ For Blazor DI guidance, which adds to or supersedes the guidance in this article
2121

2222
For information specific to dependency injection within MVC controllers, see <xref:mvc/controllers/dependency-injection>.
2323

24-
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
24+
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
2525

2626
For information on dependency injection of options, see <xref:fundamentals/configuration/options>.
2727

28-
This article provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
28+
This article provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
2929

3030
[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample))
3131

@@ -109,7 +109,7 @@ The following code is generated by the Razor Pages template using individual acc
109109

110110
## Service lifetimes
111111

112-
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
112+
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
113113

114114
To use scoped services in middleware, use one of the following approaches:
115115

@@ -120,9 +120,9 @@ For more information, see <xref:fundamentals/middleware/write#per-request-middle
120120

121121
## Service registration methods
122122

123-
See [Service registration](/dotnet/core/extensions/dependency-injection/service-registration) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
123+
See [Service registration](/dotnet/core/extensions/dependency-injection/service-registration) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
124124

125-
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
125+
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
126126

127127
Registering a service with only an implementation type is equivalent to registering that service with the same implementation and service type. This is why multiple implementations of a service can't be registered using the methods that don't take an explicit service type. These methods can register multiple *instances* of a service, but they all have the same *implementation* type.
128128

@@ -162,7 +162,7 @@ For more information on creating middleware, see <xref:fundamentals/middleware/w
162162

163163
## Constructor injection behavior
164164

165-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
165+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
166166

167167
## Entity Framework contexts
168168

@@ -212,7 +212,7 @@ The following code shows how to resolve a scoped service for a limited duration
212212

213213
## Scope validation
214214

215-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
215+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
216216

217217
For more information, see [Scope validation](xref:fundamentals/host/web-host#scope-validation).
218218

@@ -270,15 +270,15 @@ In the preceding code:
270270

271271
### IDisposable guidance for Transient and shared instances
272272

273-
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
273+
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
274274

275275
## Default service container replacement
276276

277-
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
277+
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
278278

279279
## Recommendations
280280

281-
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
281+
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
282282

283283
* Avoid using the *service locator pattern*. For example, don't invoke <xref:System.IServiceProvider.GetService%2A> to obtain a service instance when you can use DI instead:
284284

@@ -352,8 +352,8 @@ The following table lists a small sample of these framework-registered services:
352352
* [Understand dependency injection basics in .NET](/dotnet/core/extensions/dependency-injection/basics)
353353
* [Dependency injection guidelines](/dotnet/core/extensions/dependency-injection/guidelines)
354354
* [Tutorial: Use dependency injection in .NET](/dotnet/core/extensions/dependency-injection/usage)
355-
* [.NET dependency injection](/dotnet/core/extensions/dependency-injection)
356-
* [ASP.NET Core Dependecy Injection: What is the IServiceCollection?](https://www.stevejgordon.co.uk/aspnet-core-dependency-injection-what-is-the-iservicecollection)
355+
* [.NET dependency injection](/dotnet/core/extensions/dependency-injection/overview)
356+
* [ASP.NET Core Dependency Injection: What is the IServiceCollection?](https://www.stevejgordon.co.uk/aspnet-core-dependency-injection-what-is-the-iservicecollection)
357357
* [Four ways to dispose IDisposables in ASP.NET Core](https://andrewlock.net/four-ways-to-dispose-idisposables-in-asp-net-core/)
358358
* [Writing Clean Code in ASP.NET Core with Dependency Injection (MSDN)](/archive/msdn-magazine/2016/may/asp-net-writing-clean-code-in-asp-net-core-with-dependency-injection)
359359
* [Explicit Dependencies Principle](/dotnet/standard/modern-web-apps-azure-architecture/architectural-principles#explicit-dependencies)

aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-5-7.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ASP.NET Core supports the dependency injection (DI) software design pattern, whi
1111

1212
For more information specific to dependency injection within MVC controllers, see <xref:mvc/controllers/dependency-injection>.
1313

14-
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
14+
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
1515

1616
For more information on dependency injection of options, see <xref:fundamentals/configuration/options>.
1717

18-
This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
18+
This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
1919

2020
[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample))
2121

@@ -99,7 +99,7 @@ The following code is generated by the Razor Pages template using individual use
9999

100100
## Service lifetimes
101101

102-
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
102+
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
103103

104104
To use scoped services in middleware, use one of the following approaches:
105105

@@ -110,9 +110,9 @@ For more information, see <xref:fundamentals/middleware/write#per-request-middle
110110

111111
## Service registration methods
112112

113-
See [Service registration methods](/dotnet/core/extensions/dependency-injection#service-registration-methods) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
113+
See [Service registration methods](/dotnet/core/extensions/dependency-injection/service-registration#registration-methods) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
114114

115-
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
115+
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
116116

117117
Registering a service with only an implementation type is equivalent to registering that service with the same implementation and service type. This is why multiple implementations of a service cannot be registered using the methods that don't take an explicit service type. These methods can register multiple *instances* of a service, but they will all have the same *implementation* type.
118118

@@ -138,7 +138,7 @@ public class MyService
138138

139139
## Constructor injection behavior
140140

141-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
141+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
142142

143143
## Entity Framework contexts
144144

@@ -188,7 +188,7 @@ The following code shows how to resolve a scoped service for a limited duration
188188

189189
## Scope validation
190190

191-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
191+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
192192

193193
For more information, see [Scope validation](xref:fundamentals/host/web-host#scope-validation).
194194

@@ -246,15 +246,15 @@ In the preceding code:
246246

247247
### IDisposable guidance for Transient and shared instances
248248

249-
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
249+
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
250250

251251
## Default service container replacement
252252

253-
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
253+
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
254254

255255
## Recommendations
256256

257-
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
257+
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
258258

259259
* Avoid using the *service locator pattern*. For example, don't invoke <xref:System.IServiceProvider.GetService%2A> to obtain a service instance when you can use DI instead:
260260

@@ -362,11 +362,11 @@ ASP.NET Core supports the dependency injection (DI) software design pattern, whi
362362

363363
For more information specific to dependency injection within MVC controllers, see <xref:mvc/controllers/dependency-injection>.
364364

365-
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
365+
For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
366366

367367
For more information on dependency injection of options, see <xref:fundamentals/configuration/options>.
368368

369-
This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection).
369+
This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
370370

371371
[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample))
372372

@@ -489,7 +489,7 @@ The following code is generated by the Razor Pages template using individual use
489489

490490
## Service lifetimes
491491

492-
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
492+
See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
493493

494494
To use scoped services in middleware, use one of the following approaches:
495495

@@ -500,9 +500,9 @@ For more information, see <xref:fundamentals/middleware/write#per-request-middle
500500

501501
## Service registration methods
502502

503-
See [Service registration methods](/dotnet/core/extensions/dependency-injection#service-registration-methods) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
503+
See [Service registration methods](/dotnet/core/extensions/dependency-injection/service-registration#registration-methods) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
504504

505-
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
505+
It's common to use multiple implementations when [mocking types for testing](xref:test/integration-tests#inject-mock-services).
506506

507507
Registering a service with only an implementation type is equivalent to registering that service with the same implementation and service type. This is why multiple implementations of a service cannot be registered using the methods that don't take an explicit service type. These methods can register multiple *instances* of a service, but they will all have the same *implementation* type.
508508

@@ -528,7 +528,7 @@ public class MyService
528528

529529
## Constructor injection behavior
530530

531-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
531+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
532532

533533
## Entity Framework contexts
534534

@@ -582,7 +582,7 @@ The following example shows how to access the scoped `IMyDependency` service and
582582

583583
## Scope validation
584584

585-
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
585+
See [Constructor injection behavior](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
586586

587587
For more information, see [Scope validation](xref:fundamentals/host/web-host#scope-validation).
588588

@@ -640,15 +640,15 @@ In the preceding code:
640640

641641
### IDisposable guidance for Transient and shared instances
642642

643-
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
643+
See [IDisposable guidance for Transient and shared instance](/dotnet/core/extensions/dependency-injection/guidelines#idisposable-guidance-for-transient-and-shared-instances) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
644644

645645
## Default service container replacement
646646

647-
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
647+
See [Default service container replacement](/dotnet/core/extensions/dependency-injection/guidelines#default-service-container-replacement) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
648648

649649
## Recommendations
650650

651-
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection)
651+
See [Recommendations](/dotnet/core/extensions/dependency-injection/guidelines#recommendations) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview).
652652

653653
* Avoid using the *service locator pattern*. For example, don't invoke <xref:System.IServiceProvider.GetService%2A> to obtain a service instance when you can use DI instead:
654654

0 commit comments

Comments
 (0)