Compartilhar via


IRelationalCommand.ExecuteScalarAsync Método

Definição

Sobrecargas

ExecuteScalarAsync(RelationalCommandParameterObject, CancellationToken)

Executa de forma assíncrona o comando com um único resultado escalar.

ExecuteScalarAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)

Executa de forma assíncrona o comando com um único resultado escalar.

ExecuteScalarAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)
Obsoleto.

Executa de forma assíncrona o comando com um único resultado escalar.

ExecuteScalarAsync(RelationalCommandParameterObject, CancellationToken)

Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs
Origem:
IRelationalCommand.cs

Executa de forma assíncrona o comando com um único resultado escalar.

public System.Threading.Tasks.Task<object> ExecuteScalarAsync (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task<object?> ExecuteScalarAsync (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteScalarAsync : Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Public Function ExecuteScalarAsync (parameterObject As RelationalCommandParameterObject, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Parâmetros

parameterObject
RelationalCommandParameterObject

Parâmetros para esse método.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

Uma tarefa que representa a operação assíncrona. O resultado da tarefa contém o resultado do comando .

Exceções

Se o padrão CancellationToken for cancelado.

Aplica-se a

ExecuteScalarAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, CancellationToken)

Executa de forma assíncrona o comando com um único resultado escalar.

public System.Threading.Tasks.Task<object> ExecuteScalarAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteScalarAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Public Function ExecuteScalarAsync (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Parâmetros

connection
IRelationalConnection

A conexão com a qual executar.

parameterValues
IReadOnlyDictionary<String,Object>

Os valores dos parâmetros.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

Uma tarefa que representa a operação assíncrona. O resultado da tarefa contém o resultado do comando .

Aplica-se a

ExecuteScalarAsync(IRelationalConnection, IReadOnlyDictionary<String,Object>, Boolean, CancellationToken)

Cuidado

Use overload without 'manageConnection' parameter

Executa de forma assíncrona o comando com um único resultado escalar.

public System.Threading.Tasks.Task<object> ExecuteScalarAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues = default, bool manageConnection = true, System.Threading.CancellationToken cancellationToken = default);
[System.Obsolete("Use overload without 'manageConnection' parameter")]
public System.Threading.Tasks.Task<object> ExecuteScalarAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary<string,object> parameterValues, bool manageConnection, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteScalarAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
[<System.Obsolete("Use overload without 'manageConnection' parameter")>]
abstract member ExecuteScalarAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Collections.Generic.IReadOnlyDictionary<string, obj> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Public Function ExecuteScalarAsync (connection As IRelationalConnection, Optional parameterValues As IReadOnlyDictionary(Of String, Object) = Nothing, Optional manageConnection As Boolean = true, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Public Function ExecuteScalarAsync (connection As IRelationalConnection, parameterValues As IReadOnlyDictionary(Of String, Object), manageConnection As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Parâmetros

connection
IRelationalConnection

A conexão com a qual executar.

parameterValues
IReadOnlyDictionary<String,Object>

Os valores dos parâmetros.

manageConnection
Boolean

Um valor que indica se a conexão deve ser aberta e fechada conforme necessário.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

Uma tarefa que representa a operação assíncrona. O resultado da tarefa contém o resultado do comando .

Atributos

Aplica-se a