ObjectContext::SaveChanges Method (Boolean)
.NET Framework (current version)
Persists all updates to the data source and optionally resets change tracking in the object context.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
public: [BrowsableAttribute(false)] [ObsoleteAttribute("Use SaveChanges(SaveOptions options) instead.")] int SaveChanges( bool acceptChangesDuringSave )
Parameters
- acceptChangesDuringSave
-
Type:
System::Boolean
This parameter is needed for client-side transaction support. If true, the change tracking on all objects is reset after SaveChanges(Boolean) finishes. If false, you must call the AcceptAllChanges method after SaveChanges(Boolean).
Return Value
Type: System::Int32The number of objects in an Added, Modified, or Deleted state when SaveChanges was called.
| Exception | Condition |
|---|---|
| OptimisticConcurrencyException | An optimistic concurrency violation has occurred. |
Call the SaveChanges(SaveOptions) method instead.
.NET Framework
Available since 3.5
Available since 3.5
Show: