问题
How do I get the number of rows affected after a SaveChanges()?
回答1:
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.
来源:https://stackoverflow.com/questions/996629/affected-rows-entity-framework