Partager via


IMigrationCommandExecutor.ExecuteNonQueryAsync Method

Definition

Overloads

ExecuteNonQueryAsync(IEnumerable<MigrationCommand>, IRelationalConnection, CancellationToken)

Executes the given commands using the given database connection.

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

Executes the given commands using the given database connection.

ExecuteNonQueryAsync(IEnumerable<MigrationCommand>, IRelationalConnection, CancellationToken)

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

Executes the given commands using the given database connection.

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

Parameters

migrationCommands
IEnumerable<MigrationCommand>

The commands to execute.

connection
IRelationalConnection

The connection to use.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation.

Exceptions

Applies to

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

Source:
IMigrationCommandExecutor.cs

Executes the given commands using the given database connection.

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)

Parameters

migrationCommands
IReadOnlyList<MigrationCommand>

The commands to execute.

connection
IRelationalConnection

The connection to use.

executionState
MigrationExecutionState

The state of the current migration execution.

commitTransaction
Boolean

Indicates whether the transaction started by this call should be commited. If false, the transaction will be made available in executionState.

isolationLevel
Nullable<IsolationLevel>

The isolation level for the transaction.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation.

Exceptions

Applies to