语言

IMigrationCommandExecutor.ExecuteNonQueryAsync 方法

定义

重载

ExecuteNonQueryAsync(IEnumerable<MigrationCommand>, IRelationalConnection, CancellationToken)

Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs

使用给定的数据库连接执行给定命令。

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 。

返回

表示异步操作的任务。

例外

如果取消了该操作 CancellationToken 。

适用于

ExecuteNonQueryAsync(IReadOnlyList<MigrationCommand>, IRelationalConnection, MigrationExecutionState, Boolean, Nullable<IsolationLevel>, CancellationToken)

Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs
Source:
IMigrationCommandExecutor.cs

使用给定的数据库连接执行给定命令。

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 。

返回

表示异步操作的任务。

例外

如果取消了该操作 CancellationToken 。

适用于