Search Results for

    Show / Hide Table of Contents

    Class DataContextSettings

    Represents settings used to create new instances of the DataContext class.

    Inheritance
    System.Object
    DataContextSettings
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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.Boolean

    true if [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.

    Declaration
    public bool AuditTrailReloadDataOfDeletedObject { get; set; }
    Property Value
    Type Description
    System.Boolean

    Certificates

    Gets or sets the certificates.

    Declaration
    public IEnumerable<X509Certificate2> Certificates { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>

    The certificates.

    DataContextType

    Gets or sets the type of the newly created DataContext.

    Declaration
    public DataContextType DataContextType { get; set; }
    Property Value
    Type Description
    DataContextType
    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.

    Declaration
    public DbClient DbClient { get; set; }
    Property Value
    Type Description
    DbClient
    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.

    Declaration
    public DbClientSettings DbClientSettings { get; set; }
    Property Value
    Type Description
    DbClientSettings
    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.

    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 EntityObject clr properties should be generated for ModelProperty and Relations

    Declaration
    public bool GenerateClrProperties { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if 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.

    Declaration
    public bool InstallMissingSystemEntities { get; set; }
    Property Value
    Type Description
    System.Boolean
    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
    NameLocalizer

    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.Nullable<System.Guid>

    OriginalUsername

    Gets or sets the original user name (for audit/impersonation scenarios).

    Declaration
    public string OriginalUsername { get; set; }
    Property Value
    Type Description
    System.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.

    Declaration
    public bool PerformVersionCheck { get; set; }
    Property Value
    Type Description
    System.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.

    Declaration
    public bool PrepareLocalizations { get; set; }
    Property Value
    Type Description
    System.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.

    Declaration
    public bool ValidateModelOnLoad { get; set; }
    Property Value
    Type Description
    System.Boolean
    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
    DataContext dataContext

    Data context to fork from.

    Environment environment

    Optional environment.

    Returns
    Type Description
    DataContextSettings

    Cloned settings.

    In This Article
    Back to top Copyright © 2020 software architects gmbh