Conceptual framework with long-term object context

One of my main annoyances with Linq to SQL in WinForms (and I dare WPF) is the lack of support for long-term datacontexts, see here .

The problem is that you cannot receive updates from the database, you always get only the same old records until you throw out the datacontext. This is good for a web application when the page is only alive in milliseconds, but not so good in a winforms application with several associated controls that are tied to old datacontext and sit on the users desktop.

My question is, does EF have this limitation or can you get updated records from EF without dropping the object context?

+2
source share
1 answer

You can use the ObjectContext.Refresh method to update an existing context.

+3
source

Source: https://habr.com/ru/post/1703243/


All Articles