EntityFramework.Utilities
EntityFramework.Utilities copied to clipboard
How can I get the changed fields with EFBatchOperation?
normal I can use ChangeTracker.Entries() for get the current changed fields, but when I use EFBatchOperation, it's seems not run the EntityFramework's on SaveChanges event, so I don't know how can I get the changed values :(
thanks!
EFBatchOperation actions generate sql statements to directly perform the requested actions (Bulk insert for insert all for example). Because of this EF does not track the changes since the changes happen out side of EF. It would be just like some one going through Sql Server Management Studio and running an insert or update statement. In order to get the changes you would need to reload the entities with entity framework.
hum....after I review your source code, I also know about it, thanks!!
I added feature request #80 that might fix this... does this sound like something that would be desirable?