tags:

views:

73

answers:

1

How do I get the number of rows affected after a SaveChanges()?

+1  A: 

The SaveChanges Method returns an int of all items changed.

MSDN Snippet:

Return Value

Type: System.Int32

The number of objects in an Added, Modified, or Deleted state when SaveChanges was called.

bendewey
Is the details saved anywhere on what was added or deleted. I'm guessing it just something i need to keep track of.
OneSmartGuy
Take a look at the ObjectContext.ObjectStateManger property. This should contain data about the state of each entity.
bendewey

related questions