Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entity Framework - Entity Collection Refresh
Message
From
11/05/2010 01:15:45
 
 
To
10/05/2010 22:40:05
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01464069
Message ID:
01464087
Views:
62
>I have a back end data store that is receiving frequent updates from another process. (Currently SQL Express 2005 but I don't want to tie myself to that.)
>
>I have one table of groups and another that is children of that group, some of the children are periodically moved from one group to another and sometimes new children are added.
>
>When I do a:
>
>MyContext.Refresh(RefreshMode.StoreWins, group.children);
>
>The child collection does not reflect any of the added children. Is there a way to get these child collections to fully refresh?

OK... I got a little further:

group.children.Load(MergeOption.OverwriteChanges);

Does cause the children to refresh. Unfortunately... when it comes to the AssociationChanged Event:

"Events may be suppressed during bulk operations, such as Load, Attach, and Clear."

So I'm still searching for a way to update anything else that might need updating and I'm unsure how it will behave in WPF. (I'll have to test that.)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform