I have a SELECT query that I am monitoring using SQLDependency. Everything works fine, but I would like to temporarily suspend the dependency while I make an UPDATE to the data set that the query is monitoring, one that I know will fire the change notification from the database.
Currently I set a flag that marks the fact that I'm doing the update, let the dependency fire and then I reset it so I can continue monitoring the query.
There has to be a more elegant way to do it than that.