Class DataContextSettings
Represents settings used to create new instances of the Data
Inheritance
Inherited Members
Namespace: TimeCockpit.Data
Assembly: TimeCockpit.Data.dll
Syntax
public class DataContextSettings
Constructors
DataContextSettings()
Initializes a new instance of the DataContextSettings class
Declaration
public DataContextSettings()
Properties
AllowUnsignedScripts
Gets or sets a value indicating whether [allow unsigned scripts].
Declaration
public bool AllowUnsignedScripts { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
AuditTrailReloadDataOfDeletedObject
Gets or sets a value indicating whether when an object is deleted and an audit trail is enabled, the default display property is evaluated. If this property is set to false, only the guid of the deleted object is added to the xml audit trail.
Declaration
public bool AuditTrailReloadDataOfDeletedObject { get; set; }
Property Value
Type | Description |
---|---|
System. |
Certificates
Gets or sets the certificates.
Declaration
public IEnumerable<X509Certificate2> Certificates { get; set; }
Property Value
Type | Description |
---|---|
System. |
The certificates. |
DataContextType
Gets or sets the type of the newly created Data
Declaration
public DataContextType DataContextType { get; set; }
Property Value
Type | Description |
---|---|
Data |
Remarks
The default value for this property is DataContextType.NotSet (see Data
DbClient
Gets or sets the Db
Declaration
public DbClient DbClient { get; set; }
Property Value
Type | Description |
---|---|
Db |
Remarks
The default value for this property is null.
If you specify a value for this property the newly created Data
If you specify a value for this property you must not specify a value for the
Db
DbClientSettings
Gets or sets the settings that are used when the
Db
Declaration
public DbClientSettings DbClientSettings { get; set; }
Property Value
Type | Description |
---|---|
Db |
Remarks
The default value for this property is null.
If you specify a value for this property a new Db
If you specify a value for this property you must not specify a value for the
Db
Environment
Gets or sets a preprovided environment.
Declaration
public Environment Environment { get; set; }
Property Value
Type | Description |
---|---|
Environment |
GenerateClrProperties
Gets or sets a value indicating whether when creating
new instance of an Entity
Declaration
public bool GenerateClrProperties { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Remarks
The default for this property is true that is, properties are generated by default.
InstallMissingSystemEntities
Gets or sets a value indicating whether missing system entities should be automatically installed or updated when the connection to the underlying database is established.
Declaration
public bool InstallMissingSystemEntities { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
The default value for this property is false.
Localizer
Gets or sets a Localizer for the current data context.
Declaration
public NameLocalizer Localizer { get; set; }
Property Value
Type | Description |
---|---|
Name |
Model
Gets or sets a preprovided model.
Declaration
public Model Model { get; set; }
Property Value
Type | Description |
---|---|
Model |
OriginalUserDetailUuid
Gets or sets the original user detail id (for audit/impersonation scenarios).
Declaration
public Guid? OriginalUserDetailUuid { get; set; }
Property Value
Type | Description |
---|---|
System. |
OriginalUsername
Gets or sets the original user name (for audit/impersonation scenarios).
Declaration
public string OriginalUsername { get; set; }
Property Value
Type | Description |
---|---|
System. |
PerformVersionCheck
Gets or sets a value indicating whether the system should check if the system entities in the underlying database match the system objects for this program version.
Declaration
public bool PerformVersionCheck { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Note that this property is only evaluated if Install
PrepareLocalizations
Gets or sets a value indicating whether localizations should be prepared/initialized.
Declaration
public bool PrepareLocalizations { get; set; }
Property Value
Type | Description |
---|---|
System. |
ValidateModelOnLoad
Gets or sets a value indicating whether to validate the model after it has been deserialized from the database, and after all install batches where executed.
Declaration
public bool ValidateModelOnLoad { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
The default value for this property is true.
Methods
CloneForFork(DataContext, Environment)
Creates a copy of the settings for forking.
Declaration
public DataContextSettings CloneForFork(DataContext dataContext, Environment environment = null)
Parameters
Type | Name | Description |
---|---|---|
Data |
dataContext | Data context to fork from. |
Environment | environment | Optional environment. |
Returns
Type | Description |
---|---|
Data |
Cloned settings. |