I am working on a winforms c# application which is using the technologies like Entity Frame work-code first.i have to make a form in which records from database continuously should shown.first i apply a simple timer technique which updates Grid and other control after 5 sec. but it is too much expensive and eat resources.
i want to ask is there any other sophisticated method by which data in DGV and other controls automatically updated if any change happen in Database.
http://dotnet.dzone.com/articles/c-sqldependency-monitoring
Look into SQLDependency. It is designed for this exact scenario.
There is a DataChanged event handler.
I used it very recently on a project for showing 'live' data from our TFS server and it's working very well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With