Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EF4 - Multiuser app - Deleted children
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
EF4 - Multiuser app - Deleted children
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01549474
Message ID:
01549474
Views:
85
I am currently testing an application using EF4.3 containing pre-compiled queries.
                    mqryClientByID = Function(ctx As FGLMainDataEntities, pID As Integer)
                                         Return (ctx.Clients.
                                                 Include("EMails").
                                                 Where("it.ID = " + pID.ToString()
                                                ).Execute(MergeOption.OverwriteChanges).SingleOrDefault())
                                     End Function
This basically get a client's data and his related email addresses.

I just found that if I modify the emails directly in SSMS (simulating another user modifying records), I can see the modification whenever I re-execute my query with:
Dim currentClient = mqryClientByID.Invoke(mobjContext, pID)
But if I delete email addresses related to a client and I reload the client, the row is still shown in the grid.

How can I tell EF to refresh data for real?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Next
Reply
Map
View

Click here to load this message in the networking platform