How can I wait for a new row appearing in a SQL Server table from a .NET client application?
Background: I’d like to build a message queue based on a table. I don’t want to use Service Broker because I want messages to be structured and strongly typed. Using a normal table I can have relations with other tables, too.
The normal way is to use polling, but if you really need immediate events you can use the
SqlDependencyclass to get an event when the result of a query changes.