0

I would like to know how I can push data changes in a MySQL database table to an MVC Web Application. So if the table changes - the web app gets updated .. I am not talking polling or querying - I am talking MySQL has a table changed - and that table data change gets sent to the Web App - clients.

I see that SQL server seems to have some functionality built in (full version but not in express), I am not seeing this in MySQL database either (which is really what I need).

ArunPratap
  • 4,816
  • 7
  • 25
  • 43
Ken
  • 2,518
  • 2
  • 27
  • 35
  • You should be able to get inspiration from this [SignalR](https://learn.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr) simple example of "chat". – EdSF Mar 08 '19 at 07:21
  • Possible duplicate of https://stackoverflow.com/questions/51292906/sqldependency-on-a-mariadb-mysql-database/51293221 – Bradley Grainger Mar 08 '19 at 14:37
  • In MySQL you basically have to resort to polling; see my reply to a feature request for a SqlDependency equivalent here: https://github.com/mysql-net/MySqlConnector/issues/522#issuecomment-399457142 – Bradley Grainger Mar 08 '19 at 14:37

1 Answers1

0

In SQL Server you can use SqlDependency and SignalR for your requirement.

But SqlDependency not available for MySql database.

This is a sample in SQL Server + SignalR https://techbrij.com/database-change-notifications-asp-net-signalr-sqldependency

Hien Nguyen
  • 24,551
  • 7
  • 52
  • 62