linq2db by Igor Tkachev, Ilya Chudin, Svyatoslav Danyliv, Dmitry Lukashenko

<PackageReference Include="linq2db" Version="2.7.2" />

 DbCommandProcessorExtensions

public static class DbCommandProcessorExtensions
Extension point adds possibility to change implementation of DbCommand methods ExecuteScalar, ExecuteNonQuery, ExecureReader and their Async equivalents. One of possible use cases: put commands into queue and initiate them in special separate thread, to overcome lock contention in TimerQueue.Timer
public static IDbCommandProcessor Instance { get; set; }

Single instance. Change of it is not thread safe.

public static int ExecuteNonQueryExt(this IDbCommand cmd)

public static Task<int> ExecuteNonQueryExtAsync(this DbCommand cmd, CancellationToken ct)

public static DbDataReader ExecuteReaderExt(this IDbCommand cmd, CommandBehavior commandBehavior)

public static Task<DbDataReader> ExecuteReaderExtAsync(this DbCommand cmd, CommandBehavior commandBehavior, CancellationToken ct)

public static object ExecuteScalarExt(this IDbCommand cmd)

public static Task<object> ExecuteScalarExtAsync(this DbCommand cmd, CancellationToken ct)