////////////////////////////////////////////////////////////// // This code was generated by LLBLGen Pro 5.7. ////////////////////////////////////////////////////////////// // Code is generated on: // Code is generated using templates: SD.TemplateBindings.SharedTemplates // Templates vendor: Solutions Design. ////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Threading; using System.Threading.Tasks; using SD.LLBLGen.Pro.ORMSupportClasses; using SD.LLBLGen.Pro.DQE.Access; namespace Datalib.DatabaseSpecific { // __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces // __LLBLGENPRO_USER_CODE_REGION_END /// Data access adapter class, which controls the complete database interaction with the database for all objects. /// Use a DataAccessAdapter object solely per thread, and per connection. A DataAccessAdapter object contains 1 active connection /// and no thread-access scheduling code. This means that you need to create a new DataAccessAdapter object if you want to utilize /// in another thread a new connection and a new transaction or want to open a new connection. public partial class DataAccessAdapter : DataAccessAdapterBase { /// The name of the key in the *.config file of the executing application which contains the connection string. /// Default: the value set in the LLBLGen Pro project properties public static string ConnectionStringKeyName="ConnectionString.MS Access (OleDb)"; /// CTor public DataAccessAdapter() : this(ReadConnectionStringFromConfig(), false, null, null) { } /// CTor /// when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage. public DataAccessAdapter(bool keepConnectionOpen) : this(ReadConnectionStringFromConfig(), keepConnectionOpen, null, null) { } /// CTor /// The connection string to use when connecting to the database. public DataAccessAdapter(string connectionString) : this(connectionString, false, null, null) { } /// CTor /// The connection string to use when connecting to the database. /// when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage. public DataAccessAdapter(string connectionString, bool keepConnectionOpen) : this(connectionString, keepConnectionOpen, null, null) { } /// CTor. /// The connection string to use when connecting to the database. /// when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage. /// Configures this data access adapter object how to threat catalog names in persistence information. /// The name to use if catalogNameUsageSetting is set to ForceName. Ignored otherwise. /// For backwards compatibility. public DataAccessAdapter(string connectionString, bool keepConnectionOpen, CatalogNameUsage catalogNameUsageSetting, string catalogNameToUse) : base(PersistenceInfoProviderSingleton.GetInstance()) { InitClassPhase2(connectionString, keepConnectionOpen, catalogNameUsageSetting, SchemaNameUsage.Default, catalogNameToUse, string.Empty, null, null); } /// CTor /// The connection string to use when connecting to the database. /// when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage. /// Configures this data access adapter object how to threat schema names in persistence information. /// Oracle specific. The name to use if schemaNameUsageSetting is set to ForceName. Ignored otherwise. public DataAccessAdapter(string connectionString, bool keepConnectionOpen, SchemaNameUsage schemaNameUsageSetting, string schemaNameToUse) : base(PersistenceInfoProviderSingleton.GetInstance()) { InitClassPhase2(connectionString, keepConnectionOpen, CatalogNameUsage.Default, schemaNameUsageSetting, string.Empty, schemaNameToUse, null, null); } /// CTor. /// The connection string to use when connecting to the database. /// when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage. /// The from-to name value pairs and setting for the overwriting of catalog names. Can be null. /// The from-to name value pairs and setting for the overwriting of schema names. Can be null. public DataAccessAdapter(string connectionString, bool keepConnectionOpen, CatalogNameOverwriteHashtable catalogNameOverwrites, SchemaNameOverwriteHashtable schemaNameOverwrites) : base(PersistenceInfoProviderSingleton.GetInstance()) { InitClassPhase2(connectionString, keepConnectionOpen, CatalogNameUsage.Default, SchemaNameUsage.Default, string.Empty, string.Empty, catalogNameOverwrites, schemaNameOverwrites); } /// Creates a new Dynamic Query engine object and passes in the defined catalog/schema overwrite hashtables. protected override DynamicQueryEngineBase CreateDynamicQueryEngine() { return this.PostProcessNewDynamicQueryEngine(new DynamicQueryEngine()); } /// Reads the value of the setting with the key ConnectionStringKeyName from the *.config file and stores that value as the active connection string to use for this object. /// connection string read private static string ReadConnectionStringFromConfig() { #if NETSTANDARD || NETCOREAPP return RuntimeConfiguration.GetConnectionString(ConnectionStringKeyName); #else return ConfigFileHelper.ReadConnectionStringFromConfig(ConnectionStringKeyName); #endif } // __LLBLGENPRO_USER_CODE_REGION_START CustomDataAccessAdapterCode // __LLBLGENPRO_USER_CODE_REGION_END } }