IMigrationCommandExecutor.ExecuteNonQueryAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ExecuteNonQueryAsync(IEnumerable<MigrationCommand>, IRelationalConnection, CancellationToken)
透過指定的資料庫連線執行指定指令。
public System.Threading.Tasks.Task ExecuteNonQueryAsync(System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> migrationCommands, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteNonQueryAsync : seq<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ExecuteNonQueryAsync (migrationCommands As IEnumerable(Of MigrationCommand), connection As IRelationalConnection, Optional cancellationToken As CancellationToken = Nothing) As Task
參數
- migrationCommands
- IEnumerable<MigrationCommand>
執行指令。
- connection
- IRelationalConnection
連結到使用。
- cancellationToken
- CancellationToken
A CancellationToken 在等待任務完成時觀察。
傳回
一個代表非同步操作的任務。
例外狀況
適用於
ExecuteNonQueryAsync(IReadOnlyList<MigrationCommand>, IRelationalConnection, MigrationExecutionState, Boolean, Nullable<IsolationLevel>, CancellationToken)
透過指定的資料庫連線執行指定指令。
public System.Threading.Tasks.Task<int> ExecuteNonQueryAsync(System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> migrationCommands, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Migrations.MigrationExecutionState executionState, bool commitTransaction, System.Data.IsolationLevel? isolationLevel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteNonQueryAsync : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * Microsoft.EntityFrameworkCore.Migrations.MigrationExecutionState * bool * Nullable<System.Data.IsolationLevel> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Function ExecuteNonQueryAsync (migrationCommands As IReadOnlyList(Of MigrationCommand), connection As IRelationalConnection, executionState As MigrationExecutionState, commitTransaction As Boolean, Optional isolationLevel As Nullable(Of IsolationLevel) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
參數
- migrationCommands
- IReadOnlyList<MigrationCommand>
執行指令。
- connection
- IRelationalConnection
連結到使用。
- executionState
- MigrationExecutionState
目前移民執行的狀況。
- commitTransaction
- Boolean
表示此呼叫所啟動的交易是否應該被提交。
若 false,交易將以 提供。executionState
- isolationLevel
- Nullable<IsolationLevel>
交易的隔離層級。
- cancellationToken
- CancellationToken
A CancellationToken 在等待任務完成時觀察。
傳回
一個代表非同步操作的任務。