Reputation: 1948
Is ObjectContext.SaveChanges() calls ObjectContext.SaveChanges(SaveOptions.AcceptAllChangesAfterSave | SaveOptions.DetectChangesBeforeSave) under the hood?
Just want to be sure so that I can use SaveChanges() to replace all SaveChanges(SaveOptions.AcceptAllChangesAfterSave | SaveOptions.DetectChangesBeforeSave)
Thanks.
Upvotes: 0
Views: 920
Reputation: 156459
Yes, it does exactly that.
From ILSpy:
// System.Data.Objects.ObjectContext
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public int SaveChanges()
{
return this.SaveChanges(SaveOptions.AcceptAllChangesAfterSave | SaveOptions.DetectChangesBeforeSave);
}
Upvotes: 4