SqlDependency
The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.
Gets a value that indicates whether one of the result sets associated with the dependency has changed.
Gets a value that uniquely identifies this instance of the SqlDependency class.
Occurs when a notification is received for any of the commands associated with this SqlDependency object.
public SqlDependency()
Creates a new instance of the SqlDependency class with the default settings.
Creates a new instance of the SqlDependency class and associates it with the SqlCommand parameter.
Creates a new instance of the SqlDependency class, associates it with the SqlCommand parameter, and specifies notification options and a time-out value.
Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string.
Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string using the specified SQL Server Service Broker queue.
Stops a listener for a connection specified in a previous Start call.
Stops a listener for a connection specified in a previous Start call.
Associates a SqlCommand object with this SqlDependency instance.