我有24/7服务,它保持Sql Server中的充电,路由等设置(配置数据)。 启动后,它使用Linq2SQL从表中加载数据,并通过所有应用程序使用数据。 我们需要一种解决方案来更新表中的设置数据,而无需重新启动应用程序。 所以我感兴趣的是可以捕获/确定表已更新,因此我可以刷新应用程序中的设置数据。 我的意思是,当表上有任何删除,更新或插入时,可能会有事件发生。
谢谢。
I have 24/7 service which keeps setup (configuration data) for charging, routing and etc in the Sql Server. Once it is started it loads the data from table using Linq2SQL and use the data through all the application. And we need a solution to update the setup data in the table without restarting the application. So I am interested is it possible to catch/determine that the table was updated so I can refresh the setup data in the application. I mean is it possible to have events which will raise when there is any delete, update or insert on the table.
Thank you.
最满意答案
您正在寻找SqlDependency类 。
You're looking for the SqlDependency class.
更多推荐
发布评论