简体   繁体   English

如何在实体框架模型中更新列表?

[英]How to update a list in Entity framework model?

My scenario is as below: 我的情况如下:

I have a central database. 我有一个中央数据库。 I have an application based on the EF model. 我有一个基于EF模型的应用程序。 I have installed this application in several machines. 我已经在几台计算机上安装了此应用程序。

What I need to do is that when ever I update something in one machine, it should be reflected in the datagrid bound to an observable collection which is open in another machine. 我需要做的是,每当我在一台机器上更新某些东西时,它都应该反映在绑定到可观察的集合的数据网格中,该集合在另一台机器上是打开的。

You can try with the HttpListener class. 您可以尝试使用HttpListener类。

In the page there is an example showing how to implement it. 页面中有一个示例,显示了如何实现它。

If your applications are not running as Administrator you will need to register the URL that you are listening to with Netsh 如果您的应用程序未以管理员身份运行,则需要使用Netsh注册正在监听的URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM