2

I want to make a method which call automatically when someone make changes in DB in MSSQL Server. where I have to call this? now it's in the childHub Hub class. here are my functions but not working.

enter image description here This is code snippet

I want to notify when changes made to db.

1
  • 2
    It looks like you want to use Signalr to update a page with changes, is that correct? I suggest you first look at the documentation learn.microsoft.com/en-us/aspnet/core/tutorials/… and update your answer with what you tried. For example, where do you call your SQLDependencyMessage()? Commented May 24, 2022 at 9:35

1 Answer 1

3

We can't get more info from your code. When the data in the database is modified, you can get a message notification.

And Rule's comment is also useful, if you want get notification in time, you should use SignalR.

I found a good github repo for you, when the data was modified, it will send message to Dashboard.

SignalR with SqlTableDependency in Asp.Net Core

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.