//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// DataHelpers.SQL satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using u = user_rtx;

namespace DataHelpers.SQL {

static partial class HSqlCommandDispose {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ObjectDisposedException" />
public static async Task<SqlDataReader> ExecuteReader_A( SqlCommand command ) =>
   await ExecuteReader_A( command, CommandBehavior.Default ).ConfigureAwait(false);

/// <exception cref="ObjectDisposedException" />
public static async Task<SqlDataReader> ExecuteReader_A( [u.for_dispose] SqlCommand command,
                                                         [u.opt] CommandBehavior behaviour )
{
   using ( command )
      return await command.ExecuteReaderAsync( behaviour ).ConfigureAwait(false);
}

//==================================================================================================

/// <exception cref="ObjectDisposedException" />
public static async Task<int> ExecuteNonQuery_A( [u.for_dispose] SqlCommand command )
{
   using ( command )
      return await command.ExecuteNonQueryAsync().ConfigureAwait(false);
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HSqlCommandDispose

} // DataHelpers.SQL
