# ITransactionalState&lt;TState&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionalstate-1/)

## PerformRead(Func&lt;TState, TResult&gt;) {#performread-1-system-func-tstate-tresult-1da59ed9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionalstate-1/methods/performread-1-system-func-tstate-tresult-1da59ed9/)

```csharp
public abstract Task<TResult> PerformRead<TResult>(Func<TState, TResult> readFunction)
```

Performs a read operation and returns the result, without modifying the state.

### Parameters

- `readFunction` (`Func<TState, TResult>`): A function that reads the state and returns the result. The function must not modify the state.

### Returns

A task whose result is the value returned by `readFunction`.

## PerformRead(Func&lt;TState, TResult&gt;, ReadIsolation) {#performread-1-system-func-tstate-tresult-orleans-transactions-abstractions-readi-f7564ce9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionalstate-1/methods/performread-1-system-func-tstate-tresult-orleans-transactions-abstractions-readi-f7564ce9/)

```csharp
public abstract Task<TResult> PerformRead<TResult>(Func<TState, TResult> readFunction, ReadIsolation isolation)
```

Performs a read operation with the specified isolation and returns the result.

### Parameters

- `readFunction` (`Func<TState, TResult>`): A function that reads the state and returns the result. The function must leave the supplied state unchanged.
- `isolation` (`ReadIsolation`): The read isolation.

### Returns

A task whose result is the value returned by `readFunction`.

## PerformUpdate(Func&lt;TState, TResult&gt;) {#performupdate-1-system-func-tstate-tresult-88783a49}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.abstractions.itransactionalstate-1/methods/performupdate-1-system-func-tstate-tresult-88783a49/)

```csharp
public abstract Task<TResult> PerformUpdate<TResult>(Func<TState, TResult> updateFunction)
```

Performs an update operation and returns the result.

### Parameters

- `updateFunction` (`Func<TState, TResult>`): A function that reads or updates the state and returns a result.

### Returns

A task whose result is the value returned by `updateFunction`.
