IRelationalConnection IRelationalConnection Interface

Represents a connection with a relational database.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Syntax

Declaration

public interface IRelationalConnection : IRelationalTransactionManager, IDbContextTransactionManager, IDisposablePublic Interface IRelationalConnection
    Inherits IRelationalTransactionManager, IDisposable

Inherited Members

BeginTransaction(IsolationLevel),
BeginTransaction(IsolationLevel),
BeginTransactionAsync(IsolationLevel, CancellationToken),
BeginTransactionAsync(IsolationLevel, CancellationToken),
UseTransaction(DbTransaction),
UseTransaction(DbTransaction),
BeginTransaction(),
BeginTransaction(),
BeginTransactionAsync(CancellationToken),
BeginTransactionAsync(CancellationToken),
CommitTransaction(),
CommitTransaction(),
RollbackTransaction(),
RollbackTransaction(),
CurrentTransaction,
CurrentTransaction,
Dispose()
Dispose()

Properties summary

Gets or sets the active cursor.

Gets the timeout for executing a command against the database.

Gets the connection string for the database.

Gets the underlying System.Data.Common.DbConnection used to connect to the database.

Gets a value indicating whether the multiple active result sets feature is enabled.

Methods summary

Closes the connection to the database.

Opens the connection to the database.

Asynchronously opens the connection to the database.

Properties

  • ActiveCursor
    ActiveCursor

    Gets or sets the active cursor.

    IValueBufferCursor ActiveCursor { get; set; }Property ActiveCursor As IValueBufferCursor

    Property Value

  • CommandTimeout
    CommandTimeout

    Gets the timeout for executing a command against the database.

    int ? CommandTimeout { get; set; }Property CommandTimeout As Integer?

    Property Value

    • System.Nullable<T><System.Int32>
      System.Nullable<T>(Of System.Int32)
  • ConnectionString
    ConnectionString

    Gets the connection string for the database.

    string ConnectionString { get; }ReadOnly Property ConnectionString As String

    Property Value

    • System.String
      System.String
  • DbConnection
    DbConnection

    Gets the underlying System.Data.Common.DbConnection used to connect to the database.

    DbConnection DbConnection { get; }ReadOnly Property DbConnection As DbConnection

    Property Value

    • System.Data.Common.DbConnection
      System.Data.Common.DbConnection
  • IsMultipleActiveResultSetsEnabled
    IsMultipleActiveResultSetsEnabled

    Gets a value indicating whether the multiple active result sets feature is enabled.

    bool IsMultipleActiveResultSetsEnabled { get; }ReadOnly Property IsMultipleActiveResultSetsEnabled As Boolean

    Property Value

    • System.Boolean
      System.Boolean

Methods

  • Close()
    Close()

    Closes the connection to the database.

    void Close()Sub Close
  • Open()
    Open()

    Opens the connection to the database.

    void Open()Sub Open
  • OpenAsync(CancellationToken)
    OpenAsync(CancellationToken)

    Asynchronously opens the connection to the database.

    Task OpenAsync(CancellationToken cancellationToken = null)Function OpenAsync(cancellationToken As CancellationToken = Nothing) As Task

    Parameters

    • 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.Threading.Tasks.Task

      A task that represents the asynchronous operation.

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll