How to pass data from a controller to a background service
问题 I'm trying to write a simple web api project with a background service executing a method every second. This method loops over a list and just prints out (for the moment) some statistics. I declared a new list in the constructor of the background service. I'm currently encountering some issues with adding and removing items from inside the controller. public UsersController(IUserBackgroundService userService) { private readonly IUserBackgroundService _userService; public UserController