-
Notifications
You must be signed in to change notification settings - Fork 0
ExecuteExtensions.ExecuteScalarAsync
Overloads | |
---|---|
ExecuteScalarAsync<T>(this DatabaseFacade, string, CancellationToken, IEnumerable<object>) | Executes a query with a single scalar result. |
ExecuteScalarAsync<T>(this DatabaseFacade, FormattableString, CancellationToken) | Executes a query with a single scalar result. |
ExecuteExtensions.ExecuteScalarAsync<T>(this DatabaseFacade, string, CancellationToken, IEnumerable<object>) Method
Executes a query with a single scalar result.
public static System.Threading.Tasks.Task<T> ExecuteScalarAsync<T>(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade database, string sql, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken), System.Collections.Generic.IEnumerable<object?> parameters);
T
The type of result returned by the query.
database
Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade
The Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade for the context.
sql
System.String
The SQL query to execute.
cancellationToken
System.Threading.CancellationToken
A System.Threading.CancellationToken to observe while waiting for the task to complete.
parameters
System.Collections.Generic.IEnumerable<System.Object>
Parameters to use with the SQL.
System.Threading.Tasks.Task<T>
The result of the query.
ExecuteExtensions.ExecuteScalarAsync<T>(this DatabaseFacade, FormattableString, CancellationToken) Method
Executes a query with a single scalar result.
public static System.Threading.Tasks.Task<T> ExecuteScalarAsync<T>(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade database, System.FormattableString sql, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
T
The type of result returned by the query.
database
Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade
The Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade for the context.
The System.FormattableString representing a SQL query with parameters.
cancellationToken
System.Threading.CancellationToken
A System.Threading.CancellationToken to observe while waiting for the task to complete.
System.Threading.Tasks.Task<T>
The result of the query.