Class CRUDOperationCallContext
Establishes a thead-static context which surrounds CRUD operations. You can derive your own classes, the .ctor must be chained. The context can be nested. A call to .ctor must be balanced with .Dispose(). This is needed to pass some out-of-band information in some special cases to CRUD operations without changing the caller interface, i.e. to swap database connection string. This class IS NOT THREAD SAFE, so in cases of async operations, the context captures extra parameters ONLY for initial ASYNC INVOCATION, that is- a true ASYNC implementation must pass the reference along the task execution line (in which case the object may be already Disposed but usable for property access
Implements
Inherited Members
Namespace: NFX.DataAccess.CRUD
Assembly: NFX.dll
Syntax
public class CRUDOperationCallContext : DisposableObject, IDisposable
Constructors
CRUDOperationCallContext()
Declaration
public CRUDOperationCallContext()
Properties
ConnectString
Used to override store's default database connection string
Declaration
public string ConnectString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Current
Returns the current set CRUDOperationCallContext or null
Declaration
public static CRUDOperationCallContext Current { get; }
Property Value
Type | Description |
---|---|
CRUDOperationCallContext |
DatabaseName
Used to override store's default database name - used by some stores, others take db name form connect string
Declaration
public string DatabaseName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Destructor()
Declaration
protected override void Destructor()