Class DataContextSettings
- Namespace
- TimeCockpit.Data
- Assembly
- TimeCockpit.Data.dll
Represents settings used to create new instances of the DataContext class.
public class DataContextSettings
- Inheritance
-
ObjectDataContextSettings
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
DataContextSettings()
Initializes a new instance of the DataContextSettings class
public DataContextSettings()
Properties
AllowUnsignedScripts
Gets or sets a value indicating whether [allow unsigned scripts].
public bool AllowUnsignedScripts { get; set; }
Property Value
- Boolean
trueif [allow unsigned scripts]; otherwise,false.
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.
public bool AuditTrailReloadDataOfDeletedObject { get; set; }
Property Value
- Boolean
Certificates
Gets or sets the certificates.
public IEnumerable<X509Certificate2> Certificates { get; set; }
Property Value
- IEnumerable<X509Certificate2>
The certificates.
DataContextType
Gets or sets the type of the newly created DataContext.
public DataContextType DataContextType { get; set; }
Property Value
Remarks
The default value for this property is DataContextType.NotSet (see DataContextType).
DbClient
Gets or sets the DbClient that should be used by the newly created DataContext to access the underlying data store.
public DbClient DbClient { get; set; }
Property Value
Remarks
The default value for this property is null.
If you specify a value for this property the newly created DataContext will use the specified DbClient and will not create a new one.
If you specify a value for this property you must not specify a value for the DbClientSettings property (i.e. DbClientSettings has to be null).
DbClientSettings
Gets or sets the settings that are used when the DbClient instance is created that the newly created DataContext uses to access the underlying data store.
public DbClientSettings DbClientSettings { get; set; }
Property Value
Remarks
The default value for this property is null.
If you specify a value for this property a new DbClient instance will be created for the new DataContext.
If you specify a value for this property you must not specify a value for the DbClient property.
Environment
Gets or sets a preprovided environment.
public Environment Environment { get; set; }
Property Value
GenerateClrProperties
Gets or sets a value indicating whether when creating new instance of an EntityObject clr properties should be generated for ModelProperty and Relations
public bool GenerateClrProperties { get; set; }
Property Value
- Boolean
trueif clr properties should be generated; otherwise,false.
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.
public bool InstallMissingSystemEntities { get; set; }
Property Value
- Boolean
Remarks
The default value for this property is false.
Localizer
Gets or sets a Localizer for the current data context.
public NameLocalizer Localizer { get; set; }
Property Value
Model
Gets or sets a preprovided model.
public Model Model { get; set; }
Property Value
OriginalUserDetailUuid
Gets or sets the original user detail id (for audit/impersonation scenarios).
public Guid? OriginalUserDetailUuid { get; set; }
Property Value
- Nullable<Guid>
OriginalUsername
Gets or sets the original user name (for audit/impersonation scenarios).
public string OriginalUsername { get; set; }
Property Value
- String
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.
public bool PerformVersionCheck { get; set; }
Property Value
- Boolean
Remarks
Note that this property is only evaluated if InstallMissingSystemEntities is false because otherwise system entities are automatically installed or updated.
PrepareLocalizations
Gets or sets a value indicating whether localizations should be prepared/initialized.
public bool PrepareLocalizations { get; set; }
Property Value
- Boolean
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.
public bool ValidateModelOnLoad { get; set; }
Property Value
- Boolean
Remarks
The default value for this property is true.
Methods
CloneForFork(DataContext, Environment)
Creates a copy of the settings for forking.
public DataContextSettings CloneForFork(DataContext dataContext, Environment environment = null)
Parameters
dataContextDataContextData context to fork from.
environmentEnvironmentOptional environment.
Returns
- DataContextSettings
Cloned settings.