IDocumentService interface


Provides methods for adding, managing or getting documents.

public interface IDocumentService : IAddDocumentService, IAddOrUpdateService

Methods

Replace document

Replace document with new one.

Replace<TDocument>(TDocument document);

Remove document

Remove document from cloud storage.

Remove();

Get document

Retrieve document from cloud storage. Specify TDocumentType to deserialize stored document.
Check the Document for more details.

Document<TDocumentType> Get<TDocumentType>();

Example

Get document

Retrieving the document from the storage is as easy as storing it.
Specify target type to deserialize your document.

service.Collection("firstCollection").Document("myReference").Get<MyDocumentType>();

Replace document

To replace stored document with a new one, use Repalce method.

service.Collection("firstCollection").Document("docReference").Replace(newDocument);

Remove document

To remove the document from storage, call Remove, and the document will not be stored anymore.

service.Collection("firstCollection").Document("myReference").Remove();

results matching ""

    No results matching ""