9

This is a follow up question to Using Transactions or SaveChanges(false) and AcceptAllChanges()?

Specifically about this line context2.SaveChanges(false);

Now SaveChanges(bool) is deprecated. We are supposed to use SaveChanges(SaveOptions) instead.

The SaveOptions has following options:

  • None
  • AcceptAllChangesAfterSave
  • DetectChangesBeforeSave

Which of these map to SaveChanges(false)?

Community
  • 1
  • 1
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247

1 Answers1

11

SaveChanges(SaveOptions.DetectChangesBeforeSave) is equivalent of SaveChanges(false)

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670