SQLDependency on a MariaDB/MySQL database(MariaDB/MySQL 数据库上的 SQLDependency)
问题描述
我开发了一个需要显示实时信息的 Web 仪表板 (ASP.NET C#).通常我使用 SQLServer,所以 SignalR + SQLDependency 的组合效果很好.但是现在我必须使用 MariaDB/MySQL 数据库,我找不到与 SQLDependency 等效的库.通知数据库更改是否有技巧"?
I developed a web dashboard that needs to display real-time information (ASP.NET C #). Usually I use SQLServer, so the combination SignalR + SQLDependency works very well. But now I have to use a MariaDB / MySQL database and I can not find a library equivalent to SQLDependency. Is there a "trick" for notifying a change in a database?
我找到了这个库:https://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDependency.html 但它不是免费的......
I found this library : https://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDependency.html but it's not free ...
推荐答案
在 MySQL 中,您可能会利用触发器和用户定义函数 (UDF).
In MySQL, you could potentially utilize a trigger and a user-defined function (UDF).
另一个选项是 MySqlDependency,但我认为这需要购买驱动程序:
Another option would be MySqlDependency, however I believe that would require a purchased driver:
https://dev.mysql.com/doc/refman/8.0/en/create-trigger.html
https://www.devart.com/dbx/mysql/
这篇关于MariaDB/MySQL 数据库上的 SQLDependency的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MariaDB/MySQL 数据库上的 SQLDependency
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04