Прочетете на английски Редактиране

Споделяне чрез


DataServiceContext.SaveChanges Method

Definition

Saves the changes the DataServiceContext is tracking to storage.

Overloads

SaveChanges()

Saves the changes that the DataServiceContext is tracking to storage.

SaveChanges(SaveChangesOptions)

Saves the changes that the DataServiceContext is tracking to storage.

Remarks

A DataServiceResponse that contains status, headers, and errors that result from the call to SaveChanges.

SaveChanges()

Saves the changes that the DataServiceContext is tracking to storage.

C#
public System.Data.Services.Client.DataServiceResponse SaveChanges();

Returns

A DataServiceResponse that contains status, headers, and errors that result from the call to SaveChanges().

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

SaveChanges(SaveChangesOptions)

Saves the changes that the DataServiceContext is tracking to storage.

C#
public System.Data.Services.Client.DataServiceResponse SaveChanges(System.Data.Services.Client.SaveChangesOptions options);

Parameters

options
SaveChangesOptions

A member of the MergeOption enumeration that specifies the materialization option.

Returns

A DataServiceResponse that contains status, headers, and errors that result from the call to SaveChanges().

Remarks

Operations are sent to the data service in the following order

  1. DeleteLink

  2. DeleteObject

  3. UpdateObject

  4. AddObject

  5. SetLink and AddLink

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1