How to build background tasks with hosted services in ASP NET Core | DOTNET CORE



How to build background tasks with hosted services in ASP NET Core | DOTNET CORE

How to build background tasks with hosted services in ASP NET Core | DOTNET CORE

Hi Friends,

In this video, we are going to see How to build Background tasks with hosted services in ASP.NET Core.

In ASP.NET Core, background tasks can be implemented as hosted services. A hosted service is a class with background task logic that implements the IHostedService interface. This article provides three hosted service examples:

A background task that runs on a timer.
Hosted service that activates a scoped service. The scoped service can use dependency injection (DI).
Queued background tasks that run sequentially.

Source code :
https://github.com/learnsmartcoding/EssentialProducts.API/tree/feature/backgroundservice

Please post your questions in the comment section and I will be happy to answer your questions.

Subscribe for more useful videos just like this: https://www.youtube.com/channel/UCKUxSY2xp12QiP3c60sOc-g?sub_confirmation=1

Happy coding!