Is there a way to call MVC controller action from signalR hub? I noticed that when doing that controller context is null. Is there a way to do it? or maybe another solution. thanks
According to my understanding of signalR. We should have implemented the "Hub" abstract class. In controller should have implemented "controller" which is also abstract class. Suppose we have to call action of our controller from signalr hub that controller must be implemented Hub abstract class. But more than one abstract class we cannot implement in one class. Hence this is not possible to call action of controller from signalR hub.
But you can try as follow: create one class which will have implemented "Hub" abstract class as well as you create instance of your controller using mock in that class and then call your action from implemented "Hub" class.