sql dependency

Mar 20, 2016 at 10:21 PM
Hi, can you give me an example how to implement SqlDependency in Vita? I need to track which row and its fields that changed. Thanks.
Mar 20, 2016 at 10:43 PM
It depends what you need. SqlDependency class is not supported in VITA, like an explicit feature. You can just use it directly - instantiate, connect to db and get notifications, and do stuff like invalidate cache. This is major scenario for SqlDependency - get notified when other web server changed something. A typical use is cache invalidation.
If you want to track change - TransactionLog is your solution, it records changes made to all tables in the form (Table/PrimaryKey/Operation)
If you want to set an event handler, to catch/track modifications WITHIN one app instance - then hook to App.Events, there are several of them there.