//--- Methods --- public IDynamoTableBatchWriteItems PutItem <TRecord>(TRecord record, DynamoPrimaryKey <TRecord> primaryKey) where TRecord : class { _request.RequestItems.First().Value.Add(new WriteRequest { PutRequest = new PutRequest { Item = _table.SerializeItem(record, primaryKey) } }); return(this); }
public IDynamoTableTransactWriteItemsPutItem <TRecord> BeginPutItem <TRecord>(DynamoPrimaryKey <TRecord> primaryKey, TRecord record) where TRecord : class { var transactWriteItem = new TransactWriteItem { Put = new Put { TableName = _table.TableName, Item = _table.SerializeItem(record, primaryKey), } }; _request.TransactItems.Add(transactWriteItem); var converter = new DynamoRequestConverter(transactWriteItem.Put.ExpressionAttributeNames, transactWriteItem.Put.ExpressionAttributeValues, _table.SerializerOptions); return(new DynamoTableTransactWriteItemsPutItem <TRecord>(this, transactWriteItem.Put, converter)); }