Hello everyone and thanks for your help in advance. I am wokring on a SignalR application. Within the hub, I have the following code:
Private Sub dependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
Dim nHub As New NotificationHub()
nHub.SendNotifications()
End Sub
This works but fires multiple multiple times for any single record operation. I then tried:
Private Sub dependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
If e.Type = SqlNotificationType.Change Then
Dim nHub As New NotificationHub()
nHub.SendNotifications()
End If
End Sub
However, this causes no notification to be issued. Upon checking, I found the e.Type was equal to "Subscribe". I then changed the code to utilize SqlNotificationInfo:
If e.Info = SqlNotificationInfo.Insert _
Or e.Info = SqlNotificationInfo.Delete _
Or e.Info = SqlNotificationInfo.Update Then
Dim nHub As New NotificationHub()
nHub.SendNotifications()
End If
However, this doesn't fire either. I'm not really sure where to go next. Any help would be greatly appreciated.