I​Relational​Connection I​Relational​Connection Interface

Definition

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.

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

Inherited Members

Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager

BeginTransaction(System.Data.IsolationLevel)BeginTransaction(System.Data.IsolationLevel)
BeginTransactionAsync(System.Data.IsolationLevel, System.Threading.CancellationToken)BeginTransactionAsync(System.Data.IsolationLevel, System.Threading.CancellationToken)
UseTransaction(System.Data.Common.DbTransaction)UseTransaction(System.Data.Common.DbTransaction)

Microsoft.EntityFrameworkCore.Storage.IDbContextTransactionManager

System.IDisposable

System.IDisposable.Dispose()System.IDisposable.Dispose()

Properties

ActiveCursor ActiveCursor

Gets or sets the active cursor.

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

CommandTimeout CommandTimeout

Gets the timeout for executing a command against the database.

int ? CommandTimeout { get; set; }Property CommandTimeout As Integer?
Value
System.Nullable<System.Int32> System.Nullable(Of System.Int32)

ConnectionString ConnectionString

Gets the connection string for the database.

string ConnectionString { get; }ReadOnly Property ConnectionString As String
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
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
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.