RelationalCommandExtensions RelationalCommandExtensions Class

Syntax

Declaration

public static class RelationalCommandExtensionsPublic Module RelationalCommandExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • RelationalCommandExtensions
    RelationalCommandExtensions

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Methods summary

Executes the command with no results.

Asynchronously executes the command with no results.

Executes the command with a RelationalDataReader result.

Asynchronously executes the command with a RelationalDataReader result.

Executes the command with a single scalar result.

Asynchronously executes the command with a single scalar result.

Methods

  • 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

    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

    Returns

    • System.Threading.Tasks.Task<TResult><System.Int32>
      System.Threading.Tasks.Task<TResult>(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

    Returns

  • 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

    Returns

    • System.Threading.Tasks.Task<TResult><RelationalDataReader>
      System.Threading.Tasks.Task<TResult>(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

    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

    Returns

    • System.Threading.Tasks.Task<TResult><System.Object>
      System.Threading.Tasks.Task<TResult>(Of System.Object)

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

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll