Mid ASP.NET Core

When is IHostedService / BackgroundService used and how DI works?

there

  • Use IHostedService or BackgroundService for tasks that run in the

background.

  • Services are injected via constructor. Scoped services must use

IServiceScopeFactory.

More from ASP.NET Core Tutorial

All questions for this course