Chapter 7: Using IHostedService and BackgroundService
This seventh chapter isn't really about customization; it's more about a feature you can use to create background services to run tasks asynchronously inside your application. I use this feature to regularly fetch data from a remote service in a small ASP.NET Core application.
We'll examine the following topics:
- Introducing
IHostedService
- Introducing
BackgroundService
- Implementing the new Worker Service projects
The topics of this chapter refer to the Host layer of the ASP.NET Core architecture:
![Figure 7.1 – ASP.NET Core architecture](https://static.packt-cdn.com/products/9781803233604/graphics/image/Figure_7.1_B17996.jpg)
Figure 7.1 – ASP.NET Core architecture