ServiceBrokerListener icon indicating copy to clipboard operation
ServiceBrokerListener copied to clipboard

Better example

Open mbj470 opened this issue 6 years ago • 8 comments

Can you provide a little more thorough sample application? This doesn't really show us how to use your class...

image

mbj470 avatar Aug 10 '18 12:08 mbj470

Hm. What part of the sample code is unclear? There are 3 steps:

  1. You create and instance of SqlDependencyEx
  2. You subscribe on event notifications (TableChanged event)
  3. You start/stop notifications

dyatchenko avatar Aug 10 '18 15:08 dyatchenko

After you start the listener, what does the e.Data actually look like and how would you use it? Is the code for the live demo that you have running available?

mbj470 avatar Aug 10 '18 15:08 mbj470

There is a XML property: public XElement Data You can use that to see what actual data was inserted/deleted/updated (all columns with data are included as text). The sample project is also in the same repository.

dyatchenko avatar Aug 10 '18 16:08 dyatchenko

Can you provide sample application like if data updated in table, so we need updated data and previous data

vamshikpd avatar Jul 03 '19 22:07 vamshikpd

Hello,

You can check how it works in unit tests here. Please let me know if you have any other questions.

Thanks, Dmitrii

dyatchenko avatar Jul 04 '19 19:07 dyatchenko

Thank you. I will check it and let you know if I have any questions.

Sent from my iPhone

On Jul 4, 2019, at 12:47 PM, Dmitriy Dyatchenko [email protected] wrote:

Hello,

You can check how it works in unit tests here. Please let me know if you have any other questions.

Thanks, Dmitrii

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

vamshikpd avatar Jul 04 '19 20:07 vamshikpd

Hello

I have enabled the database broker and used the unit test scenario to build my application but sqldependency.TableChanged +-= (o,e) {}; this event is not fired and it’s not showing e.data parameters. Like I used update notification but e.data showing null only in that method. I was used detailTest() in your unit test class. Could please help me to fix this issue?

Thanks Vamshi

Sent from my iPhone

On Jul 4, 2019, at 12:47 PM, Dmitriy Dyatchenko [email protected] wrote:

Hello,

You can check how it works in unit tests here. Please let me know if you have any other questions.

Thanks, Dmitrii

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

vamshikpd avatar Jul 09 '19 03:07 vamshikpd

Hello,

Could you please share what SQL version are you running it on?

Thanks, Dmitrii

dyatchenko avatar Aug 03 '19 05:08 dyatchenko