views:

58

answers:

2

The data context can do it, but I need to circumvent the SubmitChanges function for a bit due to having a two stage insert process and not enough time to figure out how to make it work the right way. There are a few things which are lists of items that may or may not be modified, and I'd like to only submit the actually modified items through the process... is there a way for the programmer to tell which items had been modified?

Further, is that possible to do without the original data context they came from?

For some reason I'm guessing no on that last part, but I guess I can pass the context in if necessary.

+1  A: 

Have you tried using PropertyChanged/ing events on the entities? I'll let somebody else answer you 2nd question. I believe you'd have to copy state changes data from one context to another when you detach/attach your entity.

Sergey
That is/was basically my backup plan... was just kind of hoping there was something already built into an entity to track the modified status. I'm never that lucky. :(
Telos
A: 

You could use DataContext.GetChangeSet() method for this.

Alexander Prokofyev