Table of Contents

Class SqlCommandExtensions

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.MSSqlClient.dll

Provides extension methods that execute a SqlCommand and read its results, and that add typed parameters to it.

public static class SqlCommandExtensions
Inheritance
SqlCommandExtensions
Inherited Members

Methods

AddParameter(SqlCommand, string, object?, SqlDbType, ParameterDirection)

Adds a typed parameter with the given name, value, and direction to the command.

AddParameterType(SqlCommand, string?, SqlDbType, ParameterDirection)

Adds a parameter of the given type and direction to the command without assigning a value.

AddReturnParameter(SqlCommand, SqlDbType, string?)

Adds a typed return-value parameter to the command.

ExecuteReaderAsync(SqlCommand, Action<SqlDataReader>, CommandBehavior, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to a synchronous handler.

ExecuteReaderAsync(SqlCommand, Action<SqlDataReader>, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to a synchronous handler.

ExecuteReaderAsync(SqlCommand, Func<SqlDataReader, ValueTask>, CommandBehavior, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to the handler.

ExecuteReaderAsync(SqlCommand, Func<SqlDataReader, ValueTask>, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to the handler.

ExecuteReaderAsync<T>(SqlCommand, Func<SqlDataReader, ValueTask<T>>, CommandBehavior, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to an asynchronous transform function, returning its result.

ExecuteReaderAsync<T>(SqlCommand, Func<SqlDataReader, ValueTask<T>>, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to an asynchronous transform function, returning its result.

ExecuteReaderAsync<T>(SqlCommand, Func<SqlDataReader, T>, CommandBehavior, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to the transform function, returning its result.

ExecuteReaderAsync<T>(SqlCommand, Func<SqlDataReader, T>, CancellationToken)

Asynchronously executes the command and passes the SqlDataReader to the transform function, returning its result.