# ITransactionManagerExtension.PrepareAndCommit(string, Guid, AccessCounter, DateTime, List&lt;ParticipantId&gt;, int, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanagerextension/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanagerextension/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Transactions/Abstractions/ITransactionManagerExtension.cs#L45)

```csharp
[Orleans.Concurrency.AlwaysInterleave]
[Orleans.Transaction(0)]
[Orleans.Alias(B024EFA6)]
public virtual Task<TransactionalStatus> PrepareAndCommit(string resourceId, Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writeResources, int totalParticipants, CancellationToken cancellationToken)
```

Requests that the specified transaction manager prepare and commit a transaction.

### Parameters

- `resourceId` (`string`): The identifier of the transaction manager resource.
- `transactionId` (`Guid`): The transaction identifier.
- `accessCount` (`AccessCounter`): The number of reads and writes performed on the transaction manager by the transaction.
- `timeStamp` (`DateTime`): The transaction commit timestamp.
- `writeResources` (`List<ParticipantId>`): The participants which wrote during the transaction.
- `totalParticipants` (`int`): The total number of participants in the transaction.
- `cancellationToken` (`CancellationToken`): The token used to cancel the operation.

### Returns

A task whose result is the final transaction status.
