Amazon.DynamoDBv2.DocumentModel.Table.PutItemAsync C# (CSharp) Method

PutItemAsync() public method

Initiates the asynchronous execution of the PutItem operation.
public PutItemAsync ( Document doc, AmazonDynamoDBCallback callback, AsyncOptions asyncOptions = null ) : void
doc Document Document to save.
callback AmazonDynamoDBCallback The callback that will be invoked when the asynchronous operation completes.
asyncOptions Amazon.Runtime.AsyncOptions An instance of AsyncOptions that specifies how the async method should be executed.
return void
        public void PutItemAsync(Document doc, AmazonDynamoDBCallback<Document> callback, AsyncOptions asyncOptions = null)
        {
            asyncOptions = asyncOptions ?? new AsyncOptions();
            DynamoDBAsyncExecutor.ExecuteAsync<Document>(
                () => { return PutItemHelper(doc, null, true); },
                asyncOptions,
                callback);
        }

Same methods

Table::PutItemAsync ( Document doc, PutItemOperationConfig config, AmazonDynamoDBCallback callback, AsyncOptions asyncOptions = null ) : void

Usage Example

コード例 #1
0
 private static async Task InsertData(Table table, string id, string body)
 {
     await table.PutItemAsync(new Document(new Dictionary<string, DynamoDBEntry>
     {
         ["Id"] = new Primitive(id),
         ["Body"] = new Primitive(body)
     }));
 }
All Usage Examples Of Amazon.DynamoDBv2.DocumentModel.Table::PutItemAsync