# DynamoDBTransactionalStateStorage&lt;TState&gt;.Store(string?, TransactionalStateMetaData, List&lt;PendingTransactionState&lt;TState&gt;&gt;, long?, long?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions.dynamodb/orleans.transactions.dynamodb.transactionalstate.dynamodbtransactionalstatestorage-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.transactions.dynamodb/orleans.transactions.dynamodb.transactionalstate.dynamodbtransactionalstatestorage-1/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/AWS/Orleans.Transactions.DynamoDB/TransactionalState/DynamoDBTransactionalStateStorage.cs#L145-L321)

```csharp
public Task<string> Store(string? expectedETag, TransactionalStateMetaData metadata, List<PendingTransactionState<TState>>? statesToPrepare, long? commitUpTo, long? abortAfter)
```

Stores transactional state changes.

### Parameters

- `expectedETag` (`string?`): The ETag from the most recent `Orleans.Transactions.Abstractions.ITransactionalStateStorage-1.Load` or successful `Orleans.Transactions.Abstractions.ITransactionalStateStorage-1.Store(System.String,Orleans.Transactions.Abstractions.TransactionalStateMetaData,System.Collections.Generic.List{Orleans.Transactions.Abstractions.PendingTransactionState{-0}},System.Nullable{System.Int64},System.Nullable{System.Int64})`, identifying the durable version to update.
- `metadata` (`TransactionalStateMetaData`): The transaction metadata which replaces the currently stored metadata.
- `statesToPrepare` (`List<PendingTransactionState<TState>>`): Prepare records to add or replace, keyed by their sequence numbers. A record replaces an existing record with the same sequence number. A `null` or empty list adds no prepare records.
- `commitUpTo` (`long?`): When non-null, advances the committed state through the prepared state with this sequence number and makes prepare records at or below that sequence obsolete.
- `abortAfter` (`long?`): When non-null, removes pending prepare records whose sequence numbers are strictly greater than this value.

### Returns

A task whose result is the ETag of the durable state produced by the completed operation. The returned ETag is used as `expectedETag` for the next update.
