EntityCommand.ExecuteReaderAsync 方法

定义

重载

ExecuteReaderAsync(CommandBehavior, CancellationToken)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

ExecuteReaderAsync(CancellationToken)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

ExecuteReaderAsync(CommandBehavior)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

ExecuteReaderAsync()

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

ExecuteReaderAsync(CommandBehavior, CancellationToken)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader> ExecuteReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken);
override this.ExecuteReaderAsync : System.Data.CommandBehavior * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader>

参数

behavior
CommandBehavior

执行命令时要使用的行为

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

表示异步操作的任务。 任务结果包含 EntityDataReader 对象。

属性

例外

对于存储过程命令,如果为实体集合结果之外的任何内容调用

适用于

ExecuteReaderAsync(CancellationToken)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

public virtual System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader> ExecuteReaderAsync(System.Threading.CancellationToken cancellationToken);
override this.ExecuteReaderAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader>

参数

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

表示异步操作的任务。 任务结果包含 EntityDataReader 对象。

例外

对于存储过程命令,如果为实体集合结果之外的任何内容调用

适用于

ExecuteReaderAsync(CommandBehavior)

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

public virtual System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader> ExecuteReaderAsync(System.Data.CommandBehavior behavior);
override this.ExecuteReaderAsync : System.Data.CommandBehavior -> System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader>
Public Overridable Function ExecuteReaderAsync (behavior As CommandBehavior) As Task(Of EntityDataReader)

参数

behavior
CommandBehavior

执行命令时要使用的行为

返回

表示异步操作的任务。 任务结果包含 EntityDataReader 对象。

例外

对于存储过程命令,如果为实体集合结果之外的任何内容调用

适用于

ExecuteReaderAsync()

异步执行 命令并返回用于读取结果的数据读取器。 只能在 CommandType.CommandText (上调用,否则,请使用标准 Execute* 方法)

public virtual System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader> ExecuteReaderAsync();
override this.ExecuteReaderAsync : unit -> System.Threading.Tasks.Task<System.Data.Entity.Core.EntityClient.EntityDataReader>
Public Overridable Function ExecuteReaderAsync () As Task(Of EntityDataReader)

返回

表示异步操作的任务。 任务结果包含 EntityDataReader 对象。

例外

对于存储过程命令,如果为实体集合结果之外的任何内容调用

适用于