Is there a way to be notified in .NET when data changes in the Sql Server? Like an Event?

前端 未结 2 1795
借酒劲吻你
借酒劲吻你 2021-02-05 16:34

Is there a way to bind an event to Sql Server (specially Azure) so that, when there\'s new data in a table, for instance, my .NET process will be notified?

Another optio

2条回答
  •  深忆病人
    2021-02-05 16:55

    Not in Azure. In box product you have Query Notifications and its derivatives (SqlNotificationRequest, SqlDependency and SqlCacheDependency), see The Mysterious Notification for details. You can use it as a LINQ wrapper with LinqToCache.

    But Query Notifications are not supported on Azure. On Azure your application should notify whenever it updates the database, using Azure Queues.

提交回复
热议问题