Click or drag to resize

RGDataContextBaseSaveChangesAsync Method (Boolean, CancellationToken)

Saves all changes made in this context to the database. This method will automatically call Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.DetectChanges to discover any changes to entity instances before saving to the underlying database. This can be disabled via Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.AutoDetectChangesEnabled. Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Namespace:  Recrovit.RecroGridFramework.Data
Assembly:  Recrovit.RecroGrid (in Recrovit.RecroGrid.dll) Version: 2.6.0
Syntax
C#
public Task<int> SaveChangesAsync(
	bool acceptAllChangesOnSuccess,
	CancellationToken cancellationToken = null
)

Parameters

acceptAllChangesOnSuccess
Type: SystemBoolean
Indicates whether Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.AcceptAllChanges is called after the changes have been sent successfully to the database.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
A System.Threading.CancellationToken to observe while waiting for the task to complete.

Return Value

Type: TaskInt32
A task that represents the asynchronous save operation. The task result contains the number of state entries written to the database.
See Also