IRelationalCommand.ExecuteReaderAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ExecuteReaderAsync(RelationalCommandParameterObject, CancellationToken)
使用 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 任务完成时要观察的 。
返回
表示异步操作的任务。 任务结果包含命令的结果。
- 属性