Skip to content

Commit d2e981b

Browse files
Update dependency-injection.md (#21226)
1 parent 03f2faf commit d2e981b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/core/extensions/dependency-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ In apps that process requests, scoped services are disposed at the end of the re
168168
When using Entity Framework Core, the <xref:Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.AddDbContext%2A> extension method registers `DbContext` types with a scoped lifetime by default.
169169

170170
> [!NOTE]
171-
> Do ***not*** resolve a scoped service from a singleton. It may cause the service to have incorrect state when processing subsequent requests. It's fine to:
171+
> Do ***not*** resolve a scoped service from a singleton and be careful not to do so indirectly, for example, through a transient service. It may cause the service to have incorrect state when processing subsequent requests. It's fine to:
172172
>
173173
> - Resolve a singleton service from a scoped or transient service.
174174
> - Resolve a scoped service from another scoped or transient service.

0 commit comments

Comments
 (0)