EntityCommand.ExecuteDbDataReaderAsync 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
非同步執行命令並傳回讀取結果的資料讀取器
命名空間: System.Data.Entity.Core.EntityClient
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<DebuggerStepThroughAttribute> _
Protected Overrides Function ExecuteDbDataReaderAsync ( _
behavior As CommandBehavior, _
cancellationToken As CancellationToken _
) As Task(Of DbDataReader)
'用途
Dim behavior As CommandBehavior
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of DbDataReader)
returnValue = Me.ExecuteDbDataReaderAsync(behavior, _
cancellationToken)
[DebuggerStepThroughAttribute]
protected override Task<DbDataReader> ExecuteDbDataReaderAsync(
CommandBehavior behavior,
CancellationToken cancellationToken
)
[DebuggerStepThroughAttribute]
protected:
virtual Task<DbDataReader^>^ ExecuteDbDataReaderAsync(
CommandBehavior behavior,
CancellationToken cancellationToken
) override
[<DebuggerStepThroughAttribute>]
abstract ExecuteDbDataReaderAsync :
behavior:CommandBehavior *
cancellationToken:CancellationToken -> Task<DbDataReader>
[<DebuggerStepThroughAttribute>]
override ExecuteDbDataReaderAsync :
behavior:CommandBehavior *
cancellationToken:CancellationToken -> Task<DbDataReader>
protected override function ExecuteDbDataReaderAsync(
behavior : CommandBehavior,
cancellationToken : CancellationToken
) : Task<DbDataReader>
參數
- behavior
類型:System.Data.CommandBehavior
當執行命令時使用的行為
- cancellationToken
類型:System.Threading.CancellationToken
用來監視是否有取消要求的語彙基元
傳回值
類型:System.Threading.Tasks.Task<DbDataReader>
表示非同步作業的工作。工作結果包含 DbDataReader 物件。