locked
How to run 2 services in one time. RRS feed

  • Question

  • User-467044538 posted

    Hi,

    1. I have 2 different services that running with .AddSingleton during server start up. Here is the example in Startup.cs

    services.AddSingleton<LiveDataProvider>();
    services.AddSingleton<IHostedService, RefreshService>();

    services.AddSingleton<SimulationDataProvider>();
    services.AddSingleton<IHostedService, SimulationRefreshService>();

    2. My problem here is that the services seems to not running with this setup. I wonder what to do if I want these both services running as usual. I think there must be something with the .AddSingleton.

    Thanks.

    Wednesday, June 19, 2019 4:45 AM

Answers

All replies