Created
January 13, 2018 18:31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string connectionString = Settings.Default.ConnString; | |
string listenQuery = @ & quot; | |
SELECT[Name] FROM[dbo].[Insurers] & quot;; | |
// Create instance of the DB Listener | |
DatabaseChangeListener changeListener = new DatabaseChangeListener(connectionString); | |
// Define what to do when changes were detected | |
changeListener.OnChange += () => | |
{ | |
ChatHub.SendMessages(); | |
// Reattach listener event - DO NOT TOUCH! | |
changeListener.Start(listenQuery); | |
}; | |
// Start listening for changes | |
changeListener.Start(listenQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment