RelationalCommandExtensions RelationalCommandExtensions Class

Definition

public static class RelationalCommandExtensions
Public Module RelationalCommandExtensions
Inheritance
System.ObjectSystem.Object
RelationalCommandExtensionsRelationalCommandExtensions

Methods

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

ExecuteNonQuery(IRelationalCommand, IRelationalConnection) ExecuteNonQuery(IRelationalCommand, IRelationalConnection)

Executes the command with no results.

public static int ExecuteNonQuery(this IRelationalCommand command, IRelationalConnection connection)
<ExtensionAttribute>
Public Shared Function ExecuteNonQuery(command As IRelationalCommand, connection As IRelationalConnection) As Integer
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

Returns
System.Int32 System.Int32

The number of rows affected.

ExecuteNonQueryAsync(IRelationalCommand, IRelationalConnection, CancellationToken) ExecuteNonQueryAsync(IRelationalCommand, IRelationalConnection, CancellationToken)

Asynchronously executes the command with no results.

public static Task<int> ExecuteNonQueryAsync(this IRelationalCommand command, IRelationalConnection connection, CancellationToken cancellationToken = null)
<ExtensionAttribute>
Public Shared Function ExecuteNonQueryAsync(command As IRelationalCommand, connection As IRelationalConnection, cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
System.Threading.Tasks.Task<System.Int32> System.Threading.Tasks.Task(Of System.Int32)

A task that represents the asynchronous operation. The task result contains the number of rows affected.

ExecuteReader(IRelationalCommand, IRelationalConnection) ExecuteReader(IRelationalCommand, IRelationalConnection)

Executes the command with a RelationalDataReader result.

public static RelationalDataReader ExecuteReader(this IRelationalCommand command, IRelationalConnection connection)
<ExtensionAttribute>
Public Shared Function ExecuteReader(command As IRelationalCommand, connection As IRelationalConnection) As RelationalDataReader
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

Returns

The result of the command.

ExecuteReaderAsync(IRelationalCommand, IRelationalConnection, CancellationToken) ExecuteReaderAsync(IRelationalCommand, IRelationalConnection, CancellationToken)

Asynchronously executes the command with a RelationalDataReader result.

public static Task<RelationalDataReader> ExecuteReaderAsync(this IRelationalCommand command, IRelationalConnection connection, CancellationToken cancellationToken = null)
<ExtensionAttribute>
Public Shared Function ExecuteReaderAsync(command As IRelationalCommand, connection As IRelationalConnection, cancellationToken As CancellationToken = Nothing) As Task(Of RelationalDataReader)
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
System.Threading.Tasks.Task<RelationalDataReader> System.Threading.Tasks.Task(Of RelationalDataReader)

A task that represents the asynchronous operation. The task result contains the result of the command.

ExecuteScalar(IRelationalCommand, IRelationalConnection) ExecuteScalar(IRelationalCommand, IRelationalConnection)

Executes the command with a single scalar result.

public static object ExecuteScalar(this IRelationalCommand command, IRelationalConnection connection)
<ExtensionAttribute>
Public Shared Function ExecuteScalar(command As IRelationalCommand, connection As IRelationalConnection) As Object
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

Returns
System.Object System.Object

The result of the command.

ExecuteScalarAsync(IRelationalCommand, IRelationalConnection, CancellationToken) ExecuteScalarAsync(IRelationalCommand, IRelationalConnection, CancellationToken)

Asynchronously executes the command with a single scalar result.

public static Task<object> ExecuteScalarAsync(this IRelationalCommand command, IRelationalConnection connection, CancellationToken cancellationToken = null)
<ExtensionAttribute>
Public Shared Function ExecuteScalarAsync(command As IRelationalCommand, connection As IRelationalConnection, cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Parameters
command
IRelationalCommand IRelationalCommand

The command to be executed.

connection
IRelationalConnection IRelationalConnection

The connection to execute against.

cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
System.Threading.Tasks.Task<System.Object> System.Threading.Tasks.Task(Of System.Object)

A task that represents the asynchronous operation. The task result contains the result of the command.

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object