From 2dc4d0ff66868941c592ad6d7ebfd8ed0e53ccbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20A=C4=9F=C4=B1r?= <90545225+oguzhanagir@users.noreply.github.com> Date: Wed, 22 Oct 2025 17:59:22 +0300 Subject: [PATCH] Enhance post with guide on background job queue --- .../post.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/Community-Articles/2025-10-20-The-ASP-DotNET-Core-Dependency-Injection System/post.md b/docs/en/Community-Articles/2025-10-20-The-ASP-DotNET-Core-Dependency-Injection System/post.md index ccb1c38cbc..5f746bc910 100644 --- a/docs/en/Community-Articles/2025-10-20-The-ASP-DotNET-Core-Dependency-Injection System/post.md +++ b/docs/en/Community-Articles/2025-10-20-The-ASP-DotNET-Core-Dependency-Injection System/post.md @@ -1135,6 +1135,8 @@ builder.Services.AddHostedService(); This pattern ensures that each run of the worker uses a new `DbContext`, preventing problems such as memory leaks or stale data. +>While this example uses a simple `Task.Delay` loop within the `BackgroundService`, a robust pattern for managing decoupled background tasks involves an in memory queue. You can learn how to build this system by following this guide: [How to Build an In Memory Background Job Queue in ASP.NET Core From Scratch](https://abp.io/community/articles/how-to-build-an-in-memory-background-job-queue-in-asp.net-core-from-scratch-pai2zmtr). + ## Conclusion Understanding the **ASP.NET Core Dependency Injection** framework is essential for any .NET developer. By understanding the built in IoC container, choosing the right service lifecycles, and opting for explicit constructor injection, you can create modular, testable, and maintainable applications. @@ -1169,4 +1171,4 @@ The transition from legacy, fragmented DI environments to a unified, performant, - [IHttpClientFactory with .NET](https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory) - [Keyed Services DI Container](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-9.0#keyed-services) - [Use Scoped Services Within a Scoped Service](https://learn.microsoft.com/en-us/dotnet/core/extensions/scoped-service) -- [Scrutor](https://github.com/khellang/Scrutor) \ No newline at end of file +- [Scrutor](https://github.com/khellang/Scrutor)