Class ConnectionContext
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Helper class that wraps a connection and a transaction.
Inheritance
Inherited Members
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 9.12.2Syntax
public class ConnectionContext : IAsyncConnectionContext, 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
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines if there is an active connection on this context
Declaration
public bool IsActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInTransaction
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
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()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual void BeginTransaction()
CloseConnection()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public void CloseConnection()
CommitTransaction()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual void CommitTransaction()
OpenConnection()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Open a connection to the database
Declaration
public void OpenConnection()
OpenConnectionAsync()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual Task OpenConnectionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RollbackTransaction()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual void RollbackTransaction()