How to configure SqlDependency to monitor multiple tables

I am trying to figure out how to monitor more than one table using SqlDependency. All the examples I have found refer to the same table.

I have several classes that represent a monitor for a specific table. Every time a change event occurs, I stop the dependency and start a new one, but unhooks the other monitors. How do I get to keep track of multiple tables? Do I need to reconnect all monitors every time the event is caught?

+2


a source to share


1 answer


Use the AggregateCacheDependency class to set up dependencies on multiple tables.



+1


a source







All Articles