SQL Server Database Change Listener C#

前端 未结 5 736
灰色年华
灰色年华 2020-12-01 09:40

I want to listen for changes to data in a SQL Server database from C#. I was hoping that there would be some sort of listener which I could use to determine if data that I h

5条回答
  •  时光说笑
    2020-12-01 10:18

    The DataContext won't offer you any type of listener functionality with SQL Server. Your best bet is to create a polling application, or even a separate thread which polls the database periodically for changes and expose an event which your main application can listen to.

提交回复
热议问题