Share via


IRelationalCommand.ExecuteReaderAsync Method

Definition

Overloads

ExecuteReaderAsync(RelationalCommandParameterObject, CancellationToken)

Asynchronously executes the command with a RelationalDataReader result.

ExecuteReaderAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)

Asynchronously executes the command with a RelationalDataReader result.

ExecuteReaderAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)
Obsolete.

Asynchronously executes the command with a RelationalDataReader result.

ExecuteReaderAsync(RelationalCommandParameterObject, CancellationToken)

Asynchronously executes the command with a RelationalDataReader result.

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader> ExecuteReaderAsync (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteReaderAsync : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader>
Public Function ExecuteReaderAsync (parameterObject As RelationalCommandParameterObject, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RelationalDataReader)

Parameters

parameterObject
RelationalCommandParameterObject

Parameters for this method.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains the result of the command.

Exceptions

Applies to

ExecuteReaderAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)

Asynchronously executes the command with a RelationalDataReader result.

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader> ExecuteReaderAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteReaderAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader>
Public Function ExecuteReaderAsync (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object), Optional cancellationToken As CancellationToken = Nothing) As Task(Of RelationalDataReader)

Parameters

connection
IRelationalConnection

The connection to execute against.

parameterValues
IReadOnlyDictionary<String,Object>

The values for the parameters.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains the result of the command.

Applies to

ExecuteReaderAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)

Caution

Use overload without 'manageConnection' parameter

Asynchronously executes the command with a RelationalDataReader result.

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader> ExecuteReaderAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues = default, bool manageConnection = true, System.Threading.CancellationToken cancellationToken = default);
[System.Obsolete("Use overload without 'manageConnection' parameter")]
public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader> ExecuteReaderAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues, bool manageConnection, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteReaderAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader>
[<System.Obsolete("Use overload without 'manageConnection' parameter")>]
abstract member ExecuteReaderAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.RelationalDataReader>
Public Function ExecuteReaderAsync (connection As IRelationalConnection, Optional parameterValues As IReadOnlyDictionary(Of String, Object) = Nothing, Optional manageConnection As Boolean = true, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RelationalDataReader)
Public Function ExecuteReaderAsync (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object), manageConnection As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RelationalDataReader)

Parameters

connection
IRelationalConnection

The connection to execute against.

parameterValues
IReadOnlyDictionary<String,Object>

The values for the parameters.

manageConnection
Boolean

A value indicating whether to open and close the connection as needed.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains the result of the command.

Attributes

Applies to