Skip to content

Conversation

@Varorbc
Copy link
Contributor

@Varorbc Varorbc commented Dec 27, 2023

Summary

The IServiceScopeFactory is always registered as a singleton, but the IServiceProvider can vary based on the lifetime of the containing class.

https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#scope-scenarios


Internal previews

📄 File 🔗 Preview link
docs/core/extensions/scoped-service.md Use scoped services within a BackgroundService

@Varorbc Varorbc requested a review from IEvangelist as a code owner December 27, 2023 01:51
@dotnet-bot dotnet-bot added this to the December 2023 milestone Dec 27, 2023
@ghost ghost added the community-contribution Indicates PR is created by someone from the .NET community. label Dec 27, 2023
@IEvangelist IEvangelist merged commit 76decd9 into dotnet:main Dec 29, 2023
@Varorbc Varorbc deleted the patch-1 branch December 29, 2023 23:32
IEvangelist pushed a commit that referenced this pull request Dec 30, 2023
* Fix typography at sample code in fsharp snippets (#38913)

* Extract remarks for System.Globalization* (#38912)

* fix build suggestions (#38917)

* Remove snap reference from include file (#38902)

* clarify linux portions of http3/libmsquic (#38901)

* Add note about linux and IPC (#38849)

* Update package index with latest published versions (#38920)

* Update ScopedBackgroundService (#38880)

* Update ScopedBackgroundService.cs

* Update scoped-service.md

* Make it clear you can install multiple versions (#38919)

* Make it clear you can install multiple versions

* more clarifications

* fix link

* clarify greps (#38921)

* Add clarifications around Arm packages and Ubuntu (#38922)

* Clarify Arm

* Clarify Arm

---------

Co-authored-by: Takamasa Matsui <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Andy (Steve) De George <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: Varorbc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants