/// <summary> /// Asynchronously saves all changes made in this context to the underlying database. /// </summary> /// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param> /// <returns> /// A task that represents the asynchronous save operation. /// The task result contains the number of Objects written to the underlying database. /// </returns> public virtual Task <Int32> SaveChangesAsync(CancellationToken?cancellationToken = null) { Logger.Trace("Enter - Exit on next line."); return(cancellationToken == null ? DbCommit.CommitAsync() : DbCommit.CommitAsync(cancellationToken.Value)); }
/// <summary> /// Saves all changes made in this context to the underlying database. /// </summary> /// <returns>The number of Objects written to the underlying database.</returns> public virtual Int32 SaveChanges() { Logger.Trace("Enter - Exit on next line."); return(DbCommit.Commit()); }