How to use one Signalr hub with multiple databases?

Apr 3 at 11:02 AM
I have a scenario where users (through the GUI) create long running database jobs. As I would like to show the user progress of his job I created a 'jobs' table which has columns such as 'total' and 'progress', where I update 'progress' within the sp that is executed from the job.

Now, to implement server-to-client notification about hi job's status and progress I was going to using SignalR hubs.

However, I have a slight problem. I have a single WebApi which serves many users and these users can connect to the different databases (obviously all have the same schema). When a user sends a request, his cached info includes the connectionstring to use.

So is it possible to use SqlTableDependency and SignalR in such a scenario?
Apr 3 at 3:14 PM
You may create a new instance of SqlTableDependency for each job run by a user., and dispose it after the job is finished. For SignalR part refer to docs, there are examples using of it. For a multiclient use case it is better to ask it in SignalR forums.