Top "Asp.net-core-hosted-services" questions

Proper way to register HostedService in ASP.NET Core. AddHostedService vs AddSingleton

What is the proper way to register a custom hosted service in ASP.NET Core 2.1? For example, I have a …

c# asp.net-core .net-core dependency-injection asp.net-core-hosted-services
.net core dependency injection to hosted service

My .net core app needs to crawl data in a specified time interval. I have chosen to implement IHostedService to …

c# asp.net-core dependency-injection asp.net-core-hosted-services
How to start HostedService in MVC Core app without http request

In my MVC .NET core 2.2 app there is HostedService which doing background work. It is register in ConfigureServices method of …

c# asp.net-core asp.net-core-hosted-services
Integration Test for Hosted Service in .NET Core

I have a QueueTask Hosted service (.NET Core's new background service) that I'd like to test. My queuedHosted service looks …

c# asp.net-core .net-core mstest asp.net-core-hosted-services
How can I write unit test for my background service?

I'm working with the HostBuilder in .NET Core (not the WebHost !). I have one Hosted Service running in my application …

c# .net-core asp.net-core-hosted-services