private void DeleteOrder()

in saga-orchestration/RemoveOrderLambda/src/RemoveOrderLambda/Function.cs [27:51]


        private void DeleteOrder(OrderDetails orderDetails, ILambdaContext context)
        {
            // Define item attributes
            var attributes = new Dictionary<string, AttributeValue>
            {
                {"ItemId", new AttributeValue {S = orderDetails.ItemId}},
                {"CustomerId", new AttributeValue {S = orderDetails.CustomerId}},
            };
            

            // Create DeleteItem request
            var request = new DeleteItemRequest()
            {
                TableName = tableName,
                Key = attributes,
                ReturnValues = "ALL_OLD"
            };
 
            var response = client.DeleteItemAsync(request);
           
               
           var attributeList = response.Result.Attributes; // attribute list in the response.
           context.Logger.Log("\nPrinting item after retrieving it ............");
           PrintItem(attributeList, context);
        }