Q:

signalR invoke from event in server-side

I created an notification system in use with signalR, and also created an event that happens as soon as an notification is added. I'd like to call the function in my notifictionHub from the same event I've seen some solutions that are not valid for the version I'm working with, I'd like to know how can i do this?
NotificationHub:
        public async Task SendNotification(string user, string content)
        {
            string userID = "3";
            foreach(var cid in _connections.GetConnections(userID))
            {
                await Clients.Client(cid).SendAsync("ReceiveNotification", user, content);
            }
        }

Add notification event:
        private static void Notifications_OnNotificationAdd(Account account, Notification notification)
        {
            // call NotificationHub->SendNotification from here...  
        }

A:

In your event class:
//using this instance object, we are able to access and call the hub methods.
private IHubContext<notifictionHub> _hub;

In your event method:
private static void Notifications_OnNotificationAdd(Account account, Notification notification)
{
   _hub.Clients.All.SendNotification(yourUser, yourContent);
}

