SqlServerConnection SqlServerConnection Class

Definition

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public class SqlServerConnection : RelationalConnection, ISqlServerConnection, IRelationalConnection, IRelationalTransactionManager, IDbContextTransactionManager, IDisposable
Public Class SqlServerConnection
    Inherits RelationalConnection
    Implements ISqlServerConnection, IRelationalConnection, IRelationalTransactionManager, IDbContextTransactionManager, IDisposable
Inheritance
System.ObjectSystem.Object
SqlServerConnectionSqlServerConnection
Implements

Constructors

SqlServerConnection(IDbContextOptions, ILogger) SqlServerConnection(IDbContextOptions, ILogger(Of SqlServerConnection))

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public SqlServerConnection(IDbContextOptions options, ILogger<SqlServerConnection> logger)
Public Sub New(options As IDbContextOptions, logger As ILogger(Of SqlServerConnection))
Parameters
logger
ILogger<SqlServerConnection> ILogger(Of SqlServerConnection)

Properties

ActiveCursor ActiveCursor

Gets or sets the active cursor.

(Inherited from RelationalConnection)

CommandTimeout CommandTimeout

Gets the timeout for executing a command against the database.

(Inherited from RelationalConnection)

ConnectionString ConnectionString

Gets the connection string for the database.

(Inherited from RelationalConnection)

CurrentTransaction CurrentTransaction

Gets the current transaction.

(Inherited from RelationalConnection)

DbConnection DbConnection

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

(Inherited from RelationalConnection)

IsMultipleActiveResultSetsEnabled IsMultipleActiveResultSetsEnabled

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public override bool IsMultipleActiveResultSetsEnabled { get; }
Public Overrides ReadOnly Property IsMultipleActiveResultSetsEnabled As Boolean
Value
System.Boolean System.Boolean
Overrides

Logger Logger

Gets the logger to write to.

(Inherited from RelationalConnection)

Methods

BeginTransaction() BeginTransaction()

Begins a new transaction.

(Inherited from RelationalConnection)

BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel)

Begins a new transaction.

(Inherited from RelationalConnection)

BeginTransactionAsync(CancellationToken) BeginTransactionAsync(CancellationToken)

Asynchronously begins a new transaction.

(Inherited from RelationalConnection)

BeginTransactionAsync(IsolationLevel, CancellationToken) BeginTransactionAsync(IsolationLevel, CancellationToken)

Asynchronously begins a new transaction.

(Inherited from RelationalConnection)

Close() Close()

Closes the connection to the database.

(Inherited from RelationalConnection)

CommitTransaction() CommitTransaction()

Commits all changes made to the database in the current transaction.

(Inherited from RelationalConnection)

CreateDbConnection() CreateDbConnection()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected override DbConnection CreateDbConnection()
Protected Overrides Function CreateDbConnection As DbConnection
Returns
System.Data.Common.DbConnection System.Data.Common.DbConnection
Overrides

CreateMasterConnection() CreateMasterConnection()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual ISqlServerConnection CreateMasterConnection()
Public Overridable Function CreateMasterConnection As ISqlServerConnection
Returns

Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from RelationalConnection)

Equals(Object) Equals(Object)

Inherited from System.Object

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

Inherited from System.Object

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

Open() Open()

Opens the connection to the database.

(Inherited from RelationalConnection)

OpenAsync(CancellationToken) OpenAsync(CancellationToken)

Asynchronously opens the connection to the database.

(Inherited from RelationalConnection)

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

Inherited from System.Object

RollbackTransaction() RollbackTransaction()

Discards all changes made to the database in the current transaction.

(Inherited from RelationalConnection)

ToString() ToString()

Inherited from System.Object

UseTransaction(DbTransaction) UseTransaction(DbTransaction)

Specifies an existing System.Data.Common.DbTransaction to be used for database operations.

(Inherited from RelationalConnection)