What effect do the different EF 4 SaveOptions have on the ObjectContext?

Short correction for

SaveOptions.DetectChangesBeforeSave : this is the default. When you do
ObjectContext.SaveChanges(), the method DetectChanges() is called to
synchronized attach entities in the OSM.

SaveChanges is an overloaded version of SaveChanges(SaveOptions optsions) method, where this parameterless version calls this

SaveChanges(SaveOptions.DetectChangesBeforeSave | SaveOptions.AcceptAllChangesAfterSave)

SaveOptions is a Flag enum and in conclusion, SaveOptions.DetectChangesBeforeSave | SaveOptions.AcceptAllChangesAfterSave is the default of SaveChanges() not the DetectChangesBeforeSave

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)