title: SignalR Asp Core hub injection
body: <p>Can I inject a signalR hub (ChatHub derives from Hub) into a service by doing the following:</p>
  <p>in Startup.cs:</p>
  <p><code>services.AddSingleton&lt;ChatHub&gt;();</code></p>
  <p>To inject in another service:</p>
  <pre><code>    public AnotherClass(ChatHub chatHub)(....
  
  ... chatHub.CallMethod(...
  </code></pre>
  <p>Its working but it is a good idea?
  I always find the IHubContext for that purpose, but why should I use them?</p>