Bagikan melalui


RelationalCommandExtensions.ExecuteScalarAsync Metode

Definisi

Secara asinkron menjalankan perintah dengan satu hasil skalar.

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)

Parameter

command
IRelationalCommand

Perintah yang akan dijalankan.

connection
IRelationalConnection

Koneksi yang akan dieksekusi.

cancellationToken
CancellationToken

A CancellationToken untuk mengamati sambil menunggu tugas selesai.

Mengembalikan

Tugas yang mewakili operasi asinkron. Hasil tugas berisi hasil perintah.

Berlaku untuk