开发者

Use Entity Data Model in two projects with synchronized data between both of them

I've a solution containing 3 projects.

  1. EDM framework connect to a SQL database
  2. Desktop Application 1
  3. Desktop Application 2

I'm using the EDM project in both desktop applications, without a problem, but any database change made by one of them is not seen by the other. I.e.: if any change is made by application A to database, application B has to be restarted to be able to see those changes.

H开发者_如何学Cow can I synchronize those changes between projects? Any way to "say" to Entities to use the most updated data? Ideas?

Thank you!


Whatever your Entity Container Name is you will have to use the following:

dataEntity.Refresh();

Look into it here: http://msdn.microsoft.com/en-us/library/bb738618.aspx


You could place all the code that changes when the database changes in a single dll, shared by both of the projects.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜