Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Program
{
static void Main(string[] args)
{
string connectionString = Settings.Default.ConnString;
var changeListener = new DatabaseChangeListener(connectionString);
changeListener.OnChange += () => {
Console.WriteLine("There was a change");
changeListener.Start(@ "SELECT [Name] FROM [dbo].[Cars]");
};
changeListener.Start(@ "SELECT [Name] FROM [dbo].[Cars]");
Console.ReadLine();
}
static void dependency_OnChange(object sender, SqlNotificationEventArgs e)
{
Console.WriteLine("Hi!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment