Class SoDatabaseContextStatic<T>
Helper class for storing things in a Database Context (that used to be static)
Inherited Members
Namespace: SuperOffice
Assembly: SoCore.dll
Syntax
public sealed class SoDatabaseContextStatic<T> where T : class
Type Parameters
Name | Description |
---|---|
T | Type of value to hold |
Remarks
Call SafeGetValue to make sure the inner object is created as needed
Constructors
SoDatabaseContextStatic()
Helper class for storing things in a Database Context (that used to be static)
Declaration
public SoDatabaseContextStatic()
Remarks
Call SafeGetValue to make sure the inner object is created as needed
Properties
Value
Get the inner value from the database instance context.
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T |
Remarks
Call SafeGetValue to make sure the inner object is created as needed
Methods
SafeGetValue(Func<T>)
Get value from the database instance container and create a new if needed.
Declaration
public T SafeGetValue(Func<T> create)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | create | Function for creating a new instance. Called only if an exisisting value is not allready present. |
Returns
Type | Description |
---|---|
T |
Remarks
Call SafeGetValue to make sure the inner object is created as needed