public override async Task <TResult> ExecuteScalarAsync <TResult>(ScalarRequest request, CancellationToken cancellationToken) { return(await new SqlServerScalarCommand <TResult>(ConnectionProvider).ExecuteAsync(request, cancellationToken)); }
/// <summary> /// Executes a SQL string against the database this <see cref="IDatabaseCommander"/> is connected to which returns a single value /// </summary> /// <typeparam name="TResult">The type to convert the result to</typeparam> /// <param name="request">The data needed to execute the scalar command</param> /// <param name="cancellationToken">The CancellationToken from the caller</param> /// <returns>The result of the SQL string</returns> public abstract Task <TResult> ExecuteScalarAsync <TResult>(ScalarRequest request, CancellationToken cancellationToken);
public override TResult ExecuteScalar <TResult>(ScalarRequest request) { return(new SqlServerScalarCommand <TResult>(ConnectionProvider).Execute(request)); }
/// <summary> /// Executes a SQL string against the database this <see cref="IDatabaseCommander"/> is connected to which returns a single value /// </summary> /// <typeparam name="TResult">The type to convert the result to</typeparam> /// <param name="request">The data needed to execute the scalar command</param> /// <returns>The result of the SQL string</returns> public abstract TResult ExecuteScalar <TResult>(ScalarRequest request);