Table of Contents

Class ConnectionContext

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Connection context.

public class ConnectionContext : AbstractContext<ConnectionContext>, IDataContainer, ISimpleDataContainer, IContext, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable, ICloneThreadItem, INotCopyThreadItem
Inheritance
object
ConnectionContext
Implements
Inherited Members
Extension Methods

Constructors

ConnectionContext()

public ConnectionContext()

Properties

CurrentConnectionScope

Request connection scope.

public static CMSConnectionScope CurrentConnectionScope { get; set; }

Property Value

CMSConnectionScope

CurrentScopeConnection

Current DB connection to use within current connection scope.

public static IDataConnection CurrentScopeConnection { get; set; }

Property Value

IDataConnection

Methods

DisposeThreadScope()

Disposes the CMSConnectionScope for current thread.

[Obsolete("This method is no longer utilized by the framework and will be removed in a future release.")]
public static void DisposeThreadScope()

EnsureThreadScope(string)

Ensures the CMSConnectionScope for current thread.

[Obsolete("This method is no longer utilized by the framework and will be removed in a future release.")]
public static bool EnsureThreadScope(string connectionString)

Parameters

connectionString string

Connection string

Returns

bool

true if CMSConnectionScope was created for current thread; otherwise false

Remarks

Thread scope should be created only once per thread lifetime.