-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I'm trying to use your library and push changes using signalR but it's not triggering the changes any idea why?
getting following error
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
on line _sqlDependency.Start();
public class SignalServer : Hub
{
public readonly TestController _testController;
public IConfiguration Configuration { get; }
public SqlDependencyEx _sqlDependency;
public SignalServer(TestController testController, IConfiguration configuration)
{
Configuration = configuration;
_testController = testController;
SqlDependencyEx _sqlDependency = new SqlDependencyEx(Configuration.GetConnectionString("DefaultConnection"), "PCFStatus", "apps");
}
public async void NotifyConnection()
{
await Clients.All.SendAsync("TestBrodcasting", _testController.GetAllApps());
_sqlDependency.Start();
if (_sqlDependency != null)
{
_sqlDependency.TableChanged += OnDataChange;
}
}
private async void OnDataChange(object sender, SqlDependencyEx.TableChangedEventArgs e)
{
await Clients.All.SendAsync("TestBrodcasting", _testController.GetAllApps());
}
}
Metadata
Metadata
Assignees
Labels
No labels