IAddDocumentService interface


Provides methods for inserting new document into cloud storage.

public interface IAddDocumentService

Methods

Add document

Inserts new document into cloud storage whith specified reference. If document reference is not selected, cloud storage will assigne new reference for created document.

Method will return AddDocumentResult with reference of created document.

AddDocumentResult Add<TDocument>(TDocument document);

Examples

Add document

The following method call will also create collection firtCollection if it doesn't exist.
Reference for new document will be added by default.

service.Collection("firstCollection").Add(myDocument);

Add document with reference

To create a document with predefined reference, use next call:

service.Collection("firstCollection").Document("customReference").Add(myDocument);

results matching ""

    No results matching ""