in saga-orchestration/PlaceOrderLambda/src/PlaceOrderLambda/Function.cs [32:53]
private void CreateOrder(OrderDetails orderDetails, ILambdaContext context)
{
// Define item attributes
var attributes = new Dictionary<string, AttributeValue>();
attributes["ItemId"] = new AttributeValue { S = orderDetails.ItemId };
attributes["CustomerId"] = new AttributeValue { S = orderDetails.CustomerId };
attributes["Status"] = new AttributeValue { S = orderDetails.Status };
// Create PutItem request
var request = new PutItemRequest
{
TableName = tableName,
Item = attributes
};
// Issue PutItem request
var response = client.PutItemAsync(request);
// Check the response.
var attributeList = response.Result.Attributes; // attribute list in the response.
}