Partilhar via


RelationalCommandExtensions.ExecuteScalarAsync Método

Definição

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

public static System.Threading.Tasks.Task<object> ExecuteScalarAsync (this Microsoft.EntityFrameworkCore.Storage.IRelationalCommand command, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Threading.CancellationToken cancellationToken = default);
static member ExecuteScalarAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalCommand * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ExecuteScalarAsync (command As IRelationalCommand, connection As IRelationalConnection, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Parâmetros

command
IRelationalCommand

O comando a ser executado.

connection
IRelationalConnection

A conexão com a qual executar.

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