public WebStoreItemAddedNotification NotifyItemAdded(WebStoreItemAddedNotification notification) { // statically access a hub locally - rather than creating a client var context = GlobalHost.ConnectionManager.GetHubContext <WebStoreNotificationHub>(); context.Clients.All.OnNotifyItemAdded(notification); return(notification); }
public void NotifyItemAdded(WebStoreItemAddedNotification notification) { _context.Clients.All.OnNotifyItemAdded(notification); }