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
-
objectConnectionContext
- Implements
- Inherited Members
- Extension Methods
Constructors
ConnectionContext()
public ConnectionContext()
Properties
CurrentConnectionScope
Request connection scope.
public static CMSConnectionScope CurrentConnectionScope { get; set; }
Property Value
CurrentScopeConnection
Current DB connection to use within current connection scope.
public static IDataConnection CurrentScopeConnection { get; set; }
Property Value
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
stringConnection string
Returns
- bool
true
if CMSConnectionScope was created for current thread; otherwisefalse
Remarks
Thread scope should be created only once per thread lifetime.