共用方式為


IRelationalCommand.ExecuteReaderAsync 方法

定義

多載

ExecuteReaderAsync(RelationalCommandParameterObject, CancellationToken)

以非同步方式執行具有結果的 RelationalDataReader 命令。

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

以非同步方式執行具有結果的 RelationalDataReader 命令。

ExecuteReaderAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)
已淘汰.

以非同步方式執行具有結果的 RelationalDataReader 命令。

ExecuteReaderAsync(RelationalCommandParameterObject, CancellationToken)

來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs
來源:
IRelationalCommand.cs

以非同步方式執行具有結果的 RelationalDataReader 命令。

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)

參數

parameterObject
RelationalCommandParameterObject

這個方法的參數。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

代表非同步作業的工作。 工作結果包含命令的結果。

例外狀況

適用於

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

以非同步方式執行具有結果的 RelationalDataReader 命令。

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)

參數

connection
IRelationalConnection

要對其執行的連線。

parameterValues
IReadOnlyDictionary<String,Object>

參數的值。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

代表非同步作業的工作。 工作結果包含命令的結果。

適用於

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

警告

Use overload without 'manageConnection' parameter

以非同步方式執行具有結果的 RelationalDataReader 命令。

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)

參數

connection
IRelationalConnection

要對其執行的連線。

parameterValues
IReadOnlyDictionary<String,Object>

參數的值。

manageConnection
Boolean

值,指出是否視需要開啟和關閉連線。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

代表非同步作業的工作。 工作結果包含命令的結果。

屬性

適用於