Saving changes

Pending registered operations (RegisterUpload, RegisterRename, RegisterFileDeletion or metadata changes) will not be send to the server until the SaveChangesAsync is called.


Task SaveChangesAsync();
Return Value
Task A task that represents the asynchronous save operation

Applying changes

The RavenFS session, in contrast to the IDocumentSession, does not send changes as a batch operation in a single call. Each registered file modification will be executed in a separate request.

If the exception occurs when the file change is applied, the exception will be thrown by the SaveChangesAsync and any pending modifications will be canceled.


await session.SaveChangesAsync();