SaaS CMS has officially launched! Learn more now.

Class ConnectionContext

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Helper class that wraps a connection and a transaction.

Inheritance
System.Object
ConnectionContext
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 7.19.2
Syntax
public class ConnectionContext : IConnectionContext

Constructors

ConnectionContext(DbProviderFactory, ConnectionStringSettings, RetryPolicy)

Declaration
public ConnectionContext(DbProviderFactory factory, ConnectionStringSettings settings, RetryPolicy retryPolicy)
Parameters
Type Name Description
System.Data.Common.DbProviderFactory factory
System.Configuration.ConnectionStringSettings settings
RetryPolicy retryPolicy

Properties

Connection

Declaration
public DbConnection Connection { get; set; }
Property Value
Type Description
System.Data.Common.DbConnection

IsActive

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Determines if there is an active connection on this context

Declaration
public bool IsActive { get; }
Property Value
Type Description
System.Boolean

IsInTransaction

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Determine if there is an active transaction

Declaration
public virtual bool IsInTransaction { get; }
Property Value
Type Description
System.Boolean

Transaction

Declaration
public DbTransaction Transaction { get; set; }
Property Value
Type Description
System.Data.Common.DbTransaction

Methods

BeginTransaction()

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Begin transaction

Declaration
public virtual void BeginTransaction()

CloseConnection()

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Close connection

Declaration
public void CloseConnection()

CommitTransaction()

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Commit transaction

Declaration
public virtual void CommitTransaction()

OpenConnection()

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Open a connection to the database

Declaration
public void OpenConnection()

RollbackTransaction()

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Rollback transaction

Declaration
public virtual void RollbackTransaction()

Implements

Extension Methods