SaveChanges Method (Boolean)
Collapse the table of content
Expand the table of content

ObjectContext::SaveChanges Method (Boolean)

 
obsoleteCodeEntityM:System.Data.Objects.ObjectContext.SaveChanges(System.Data.Objects.SaveOptions)Note: This API is now obsolete.

Persists all updates to the data source and optionally resets change tracking in the object context.

Namespace:   System.Data.Objects
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::Int32

The 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
Return to top
Show:
© 2016 Microsoft