CouchbaseBucket InsertAsync T  Method (IDocument T , ReplicateTo, PersistTo)Couchbase .NET SDK 2.1.0 Documentation
Inserts a JSON document into the IBucketfailing if it exists as an asynchronous operation.

Namespace: Couchbase
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax
public Task<IDocumentResult<T>> InsertAsync<T>(
	IDocument<T> document,
	ReplicateTo replicateTo,
	PersistTo persistTo
)

Parameters

document
Type: Couchbase IDocument T 
The IDocument T  JSON document to add to the database.
replicateTo
Type: Couchbase ReplicateTo
The durability requirement for replication.
persistTo
Type: Couchbase PersistTo
The durability requirement for persistence.
Type Parameters
T
The Type T value of the document to be inserted.

Return Value

Type: Task IDocumentResult T  
The Task TResult  object representing the asynchronous operation.

Implements

IBucket InsertAsync T (IDocument T , ReplicateTo, PersistTo)
See Also