using Luticate2.Utils.Hubs; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Infrastructure; namespace Luticate2.Utils.Business { public class LuNotificationsBusiness { private readonly IHubContext _hubContext; public LuNotificationsBusiness(IConnectionManager connectionManager) { _hubContext = connectionManager.GetHubContext(); } public void Notify(string eventName, string entityType, object entity) { _hubContext.Clients.All.notify(eventName, entityType, entity); } public void NotifyUpdate(string eventName, string entityType, object entity) { Notify("update", entityType, entity); } } }