EntityCommand.ExecuteNonQueryAsync 方法 (CancellationToken)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
非同步執行命令並捨棄命令傳回的任何結果
命名空間: System.Data.Entity.Core.EntityClient
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<DebuggerStepThroughAttribute> _
Public Overrides Function ExecuteNonQueryAsync ( _
cancellationToken As CancellationToken _
) As Task(Of Integer)
'用途
Dim instance As EntityCommand
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of Integer)
returnValue = instance.ExecuteNonQueryAsync(cancellationToken)
[DebuggerStepThroughAttribute]
public override Task<int> ExecuteNonQueryAsync(
CancellationToken cancellationToken
)
[DebuggerStepThroughAttribute]
public:
virtual Task<int>^ ExecuteNonQueryAsync(
CancellationToken cancellationToken
) override
[<DebuggerStepThroughAttribute>]
abstract ExecuteNonQueryAsync :
cancellationToken:CancellationToken -> Task<int>
[<DebuggerStepThroughAttribute>]
override ExecuteNonQueryAsync :
cancellationToken:CancellationToken -> Task<int>
public override function ExecuteNonQueryAsync(
cancellationToken : CancellationToken
) : Task<int>
參數
- cancellationToken
類型:System.Threading.CancellationToken
等候工作完成時要觀察的 CancellationToken。
傳回值
類型:System.Threading.Tasks.Task<Int32>
表示非同步作業的工作。工作結果包含受影響的資料列數。