Home Dashboard Directory Help
Search

Disconnected Change Tracking for LINQ to SQL and Entity Framework by TerryYoung


Status: 

Closed
 as External Help for as External


2
0
Sign in
to vote
Type: Suggestion
ID: 307588
Opened: 10/30/2007 11:31:28 AM
Access Restriction: Public
1
Workaround(s)
view

Description

Both LINQ to SQL and the ADO.NET Entity Framework provide change tracking when entity objects obtained from the database remain 'connected' to the DataContext or ObjectContext object through which they were retrieved. However, when the entity objects are disconnected this automatic change tracking is lost. People are busy trying to come up with their own way of tracking changes to the data in the objects so that the database can be updated efficiently and correctly.

I find it highly surprising that neither of these technologies provides a 'disconnected' capability especially considering that
a) disconnected scenarios are common
b) such a capability has previously been provided through datasets.
Details
Sign in to post a comment.
Posted by Shimmy Weitzhandler on 6/29/2013 at 6:03 PM
Frustrating issue.
Look at GraphDiff project (NuGet - https://github.com/refactorthis/GraphDiff). This is how EF should work.

I should be able to update an entire object graph in one liner with FluenApi.
Posted by Microsoft on 1/8/2008 at 4:09 PM
Hi Terry,

Thanks for your feedback. We are aware of this as a general feature gap in both Entity Framework and LINQ to SQL. We are certainly considering this for the next release.

ADO.NET / LINQ to SQL Team
Sign in to post a workaround.
Posted by Shimmy Weitzhandler on 7/3/2013 at 9:02 PM
1) Use NHibernate, NH supports this feature
2) https://github.com/refactorthis/GraphDiff
3) Curse and do all the attaching, etc.etc.etc.etc. manually