# ICosmosOperationExecutor Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.icosmosoperationexecutor/)

## ExecuteOperation(Func&lt;TArg, Task&lt;TResult&gt;&gt;, TArg) {#executeoperation-2-system-func-targ-system-threading-tasks-task-tresult-targ-e2f2ea75}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.icosmosoperationexecutor/methods/executeoperation-2-system-func-targ-system-threading-tasks-task-tresult-targ-e2f2ea75/)

```csharp
public abstract Task<TResult> ExecuteOperation<TArg, TResult>(Func<TArg, Task<TResult>> func, TArg arg)
```

Executes the provided Cosmos DB operation.

### Parameters

- `func` (`Func<TArg, Task<TResult>>`): The delegate to execute.
- `arg` (`TArg`): The argument to pass to delegate invocations.

### Returns

The result of invoking the delegate.
