Method ExecuteReadAsync
- Namespace
- Neo4j.Driver
- Assembly
- Neo4j.Driver.dll
ExecuteReadAsync<TResult>(Func<IAsyncQueryRunner, Task<TResult>>, Action<TransactionConfigBuilder>)
Asynchronously execute given unit of work as a transaction with a specific TransactionConfig.
Task<TResult> ExecuteReadAsync<TResult>(Func<IAsyncQueryRunner, Task<TResult>> work, Action<TransactionConfigBuilder> action = null)
Parameters
workFunc<IAsyncQueryRunner, Task<TResult>>The Func<T, TResult> to be applied to a new read transaction.
actionAction<TransactionConfigBuilder>Given a TransactionConfigBuilder, defines how to set the configurations for the new transaction. This configuration overrides server side default transaction configurations. See TransactionConfig
Returns
- Task<TResult>
A task that represents the asynchronous execution operation.
Type Parameters
TResult
ExecuteReadAsync(Func<IAsyncQueryRunner, Task<IResultCursor>>, Action<TransactionConfigBuilder>)
Asynchronously execute given unit of work as a transaction with a specific TransactionConfig.
[Obsolete("Do not return IResultCursor from a transaction function. The cursor is backed by the transaction, which is committed and closed before the caller can use it. Consume results inside the delegate instead, e.g. return await cursor.ToListAsync().", false)]
Task<IResultCursor> ExecuteReadAsync(Func<IAsyncQueryRunner, Task<IResultCursor>> work, Action<TransactionConfigBuilder> action = null)
Parameters
workFunc<IAsyncQueryRunner, Task<IResultCursor>>The Func<T, TResult> to be applied to a new read transaction.
actionAction<TransactionConfigBuilder>Given a TransactionConfigBuilder, defines how to set the configurations for the new transaction. This configuration overrides server side default transaction configurations. See TransactionConfig
Returns
- Task<IResultCursor>
A task that represents the asynchronous execution operation.
ExecuteReadAsync(Func<IAsyncQueryRunner, Task>, Action<TransactionConfigBuilder>)
Asynchronously execute given unit of work as a transaction with a specific TransactionConfig.
Task ExecuteReadAsync(Func<IAsyncQueryRunner, Task> work, Action<TransactionConfigBuilder> action = null)
Parameters
workFunc<IAsyncQueryRunner, Task>The Func<T, TResult> to be applied to a new read transaction.
actionAction<TransactionConfigBuilder>Given a TransactionConfigBuilder, defines how to set the configurations for the new transaction. This configuration overrides server side default transaction configurations. See TransactionConfig
Returns
- Task
A task that represents the asynchronous execution operation.