MigrationCommand.ExecuteNonQueryAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ExecuteNonQueryAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken) |
Executes the command and returns the number of rows affected. |
ExecuteNonQueryAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken) |
ExecuteNonQueryAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)
Executes the command and returns the number of rows affected.
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)
Parameters
- connection
- IRelationalConnection
The connection to execute against.
- parameterValues
- IReadOnlyDictionary<String,Object>
The values for the parameters, or null
if the command has no parameters.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
A task that represents the asynchronous operation. The task result contains the number of rows affected.
Exceptions
If the CancellationToken is canceled.
Applies to
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)
Parameters
- connection
- IRelationalConnection
- parameterValues
- IReadOnlyDictionary<String,Object>
- manageConnection
- Boolean
- cancellationToken
- CancellationToken
Returns
Applies to
Entity Framework