DALs.Sql/Extensions/IDbCommandExtensions.cs
/// <summary>
/// execute scalar as an asynchronous operation.
/// </summary>
/// <param name="command">The command.</param>
/// <returns>Task&lt;System.Object&gt;.</returns>
execute scalar as an asynchronous operation.
execute scalar as an asynchronous operation .
public static async Task<object> ExecuteScalarAsync(this IDbCommand command)
        {
            var dbCommand = command as DbCommand;
            if (dbCommand != null)
            {
                return await dbCommand.ExecuteScalarAsync();
            }
            return await Task.Run(() => command.ExecuteScalar());
        }
public static async Task < object > ExecuteScalarAsync ( this IDbCommand command ) { var dbCommand = command as DbCommand ; if ( dbCommand != null ) { return await dbCommand . ExecuteScalarAsync ( ) ; } return await Task . Run ( ( ) => command . ExecuteScalar ( ) ) ; }
execute scalar as an asynchronous operation.
execute scalar as an asynchronous operation .
None
IDbCommand
this
<not_specific>
command
<not_specific>
None