Startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddHostedService<Worker>(); // the worker will run
services.AddControllers();
}
public void ConfigureServices(IServiceCollection services)
{
services.AddHostedService<Worker>(); // the worker will run
services.AddControllers();
}
public void ConfigureServices(IServiceCollection services) { services.AddHostedService<Worker>(); // the worker will run services.AddControllers(); }