MigrationCommand.ExecuteNonQueryAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ExecuteNonQueryAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)
執行 命令,並傳回受影響的資料列數目。
public virtual System.Threading.Tasks.Task<int> ExecuteNonQueryAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues = default, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<int> ExecuteNonQueryAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object?>? parameterValues = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteNonQueryAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.ExecuteNonQueryAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overridable Function ExecuteNonQueryAsync (connection As IRelationalConnection, Optional parameterValues As IReadOnlyDictionary(Of String, Object) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
參數
- connection
- IRelationalConnection
要對其執行的連線。
- parameterValues
- IReadOnlyDictionary<String,Object>
參數的值,如果命令沒有參數,則 null
為 。
- cancellationToken
- CancellationToken
等候 CancellationToken 工作完成時要觀察的 。
傳回
代表非同步作業的工作。 工作結果包含受影響的資料列數目。
例外狀況
適用於
ExecuteNonQueryAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)
public virtual System.Threading.Tasks.Task<int> ExecuteNonQueryAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues = default, bool manageConnection = true, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteNonQueryAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.ExecuteNonQueryAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Overridable Function ExecuteNonQueryAsync (connection As IRelationalConnection, Optional parameterValues As IReadOnlyDictionary(Of String, Object) = Nothing, Optional manageConnection As Boolean = true, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
參數
- connection
- IRelationalConnection
- parameterValues
- IReadOnlyDictionary<String,Object>
- manageConnection
- Boolean
- cancellationToken
- CancellationToken