# ITransactionManager Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanager/)

## Ping(Guid, DateTime, ParticipantId) {#ping-system-guid-system-datetime-orleans-transactions-participantid-6effd897}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanager/methods/ping-system-guid-system-datetime-orleans-transactions-participantid-6effd897/)

```csharp
public abstract Task Ping(Guid transactionId, DateTime timeStamp, ParticipantId resource)
```

One-way message sent by participants to TM, to let TM know they are still waiting to hear about the fate of a transaction.

### Parameters

- `transactionId` (`Guid`): The id of the transaction
- `timeStamp` (`DateTime`): The commit timestamp of the transaction
- `resource` (`ParticipantId`): The participant sending the message

## PrepareAndCommit(Guid, AccessCounter, DateTime, List&lt;ParticipantId&gt;, int) {#prepareandcommit-system-guid-orleans-transactions-abstractions-accesscounter-sys-46ccfad3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanager/methods/prepareandcommit-system-guid-orleans-transactions-abstractions-accesscounter-sys-46ccfad3/)

```csharp
public abstract Task<TransactionalStatus> PrepareAndCommit(Guid transactionId, AccessCounter accessCount, DateTime timeStamp, List<ParticipantId> writerResources, int totalParticipants)
```

Request sent by TA to TM. The TM responds after committing or aborting the transaction.

### Parameters

- `transactionId` (`Guid`): the id of the transaction to prepare
- `accessCount` (`AccessCounter`): number of reads/writes performed on this participant by this transaction
- `timeStamp` (`DateTime`): the commit timestamp for this transaction
- `writerResources` (`List<ParticipantId>`): the participants who wrote during the transaction
- `totalParticipants` (`int`): the total number of participants in the transaction

### Returns

the status of the transaction

## Prepared(Guid, DateTime, ParticipantId, TransactionalStatus) {#prepared-system-guid-system-datetime-orleans-transactions-participantid-orleans-1e44d827}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionmanager/methods/prepared-system-guid-system-datetime-orleans-transactions-participantid-orleans-1e44d827/)

```csharp
public abstract Task Prepared(Guid transactionId, DateTime timeStamp, ParticipantId resource, TransactionalStatus status)
```

One-way message sent by a participant to the TM after it (successfully or unsuccessfully) prepares.

### Parameters

- `transactionId` (`Guid`): The id of the transaction
- `timeStamp` (`DateTime`): The commit timestamp of the transaction
- `resource` (`ParticipantId`): The participant sending the message
- `status` (`TransactionalStatus`): The outcome of the prepare
