捕捉/提高对表中的数据更新C#事件 [英] Catch/Raise event on table data update C#

查看:93
本文介绍了捕捉/提高对表中的数据更新C#事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有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.

感谢你。

推荐答案

您正在寻找的的SqlDependency类

这篇关于捕捉/提高对表中的数据更新C#事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆