Route To Take With SqlDependency OnChange

别等时光非礼了梦想. 提交于 2019-12-11 08:05:01

问题


I am trying to integrate live updates in my ASP.NET WebAPI and I have hit a wall so to say. I have my application set up (using Angular on front end), and I've got it so when the page initially loads it issues a get request from my SQL database and the web page loads with this data. This data changes pretty frequently, and I want to incorporate live updates. I have my back end set up to use a SqlDependency to notify me when a change in the database occurs, but where to go from here I have no clue. I have tried to get SignalR to work with my OnChange event handler for SqlDependency but I didn't see too much online about this. I then thought it might be easier to use Angular and try polling, but again I did not see how I would incorporate this with my OnChange event handler. Any ideas on the simplest way I can communicate between the server and clients that the database has changed?

来源:https://stackoverflow.com/questions/51274393/route-to-take-with-sqldependency-onchange

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!