CouchbaseBucket.InsertAsync<T> Method (String, T, TimeSpan)Couchbase .NET SDK 2.3.3
Inserts a document into the database for a given key, failing if it exists as an asynchronous operation.

Namespace: Couchbase
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 0.0.0.0 (0.0.0.0)
Syntax
public Task<IOperationResult<T>> InsertAsync<T>(
	string key,
	T value,
	TimeSpan expiration
)

Parameters

key
Type: System.String
The unique key for indexing.
value
Type: T
The value for the key.
expiration
Type: System.TimeSpan
The time-to-live (ttl) for the key.
Type Parameters
T
The Type of the value to be inserted.

Return Value

Type: Task<IOperationResult<T>>
The Task<TResult> object representing the asynchronous operation.

Implements

IBucket.InsertAsync<T>(String, T, TimeSpan)
See Also