/// <summary> /// Initializes a new instance of the ConnectionParameters class. /// </summary> /// <param name="name"></param> public ConnectionParameters(string name) { mName = name; MappingAssemblies.Add(Assembly.GetExecutingAssembly()); LoadAssembliesFromConfiguration(); }
public void AddMappingAssembly(Assembly mappingAssembly) { if (MappingAssemblies == null) { MappingAssemblies = new List <Assembly>(); } MappingAssemblies.Add(mappingAssembly); }
internal void CreateModel(DbModelBuilder modelBuilder) { var mappings = MappingAssemblies.SelectMany(m => m.GetTypes()).Where(p => p.IsClass && typeof(IDbMap).IsAssignableFrom(p) && !p.IsAbstract).ToList(); foreach (var m in mappings) { var objInstance = GetInstanceOfDbMapBehaviour(m); objInstance.SetModelBuilder(modelBuilder); objInstance.Map(); } }
/// <summary> /// Load the assemblies from the BusiBlocks configuration section. /// </summary> private void LoadAssembliesFromConfiguration() { // Get the configuration section BusiBlocksSection section = BusiBlocksSection.Section; if (section == null) { return; } foreach (AssemblyMappingElement element in section.Mappings) { MappingAssemblies.Add(Assembly.Load(element.Assembly)); } }
public CoreUmbracoConfig() : base() { MappingAssemblies.Add(typeof(YuzuStartup).Assembly); }
/// <summary> /// Initialisiert eine neue Instanz der <see cref="SybaseWindowsConfigurationProvider"/> Klasse. /// </summary> /// <param name="hostName">Der Name, bzw. die IP des Datenbank-Servers</param> /// <param name="globalDatabasePath">Der Datenbank-Pfad auf dem Server</param> public SybaseWindowsConfigurationProvider([NotNull] string hostName, [NotNull] string globalDatabasePath) { HostName = hostName; GlobalDatabasePath = globalDatabasePath; MappingAssemblies.Add(typeof(Global.Mappings.FirmaMap).Assembly); }
public FormUmbracoConfig() : base() { MappingAssemblies.Add(typeof(YuzuFormsStartup).Assembly); }
public override string ToString() { return(@"-----------DatabaseConfig----------- ParameterPrefix=" + ParameterPrefix + @" ParameterSuffix=" + ParameterSuffix + @" GlobalTablePrefix=" + GlobalTablePrefix + @" ExecuteTimeout=" + ExecuteTimeout + @" DefaultPageSize=" + DefaultPageSize + @" AutoDisposeConnection=" + AutoDisposeConnection + @" ValidateStopOnFirstFailure=" + ValidateStopOnFirstFailure + @" LoadMapperMode=" + LoadMapperMode + @" EnableLobConverter=" + EnableLobConverter + @" LobConverterClassName=" + LobConverterClassName + @" BulkOperateClassName=" + BulkOperateClassName + @" EnableDefaultPropertySecurityValidate=" + EnableDefaultPropertySecurityValidate + @" PropertySecurityValidateClassName=" + PropertySecurityValidateClassName + @" EnableDebug=" + EnableDebug + @" EnableIntercept=" + EnableIntercept + @" EnableLogError=" + EnableLogError + @" EnableOrmLog=" + EnableOrmLog + @" EnableInternalLog=" + EnableInternalLog + @" LogWithRawSql=" + LogWithRawSql + @" CategoryLogType=" + CategoryLogType + @" OrmLogsPath=" + OrmLogsPath + @" MaxServerLogSize=" + MaxServerLogSize + @" EnableOrmCache=" + EnableOrmCache + @" CacheOrmTime=" + CacheOrmTime + @" CacheOrmSingleTime=" + CacheOrmSingleTime + @" OrmCacheCheckPeriod=" + OrmCacheCheckPeriod + @" EnableSqlMap=" + EnableSqlMap + @" NameSpacePrefix=" + NameSpacePrefix + @" CanUpdatedWhenTableExisted=" + CanUpdatedWhenTableExisted + @" FormatSql=" + FormatSql + @" IsWatchSqlMapFile=" + IsWatchSqlMapFile + @" WatchSqlMapInterval=" + WatchSqlMapInterval + @" SqlMapDirPaths=" + string.Join(";", SqlMapDirPaths.Select(p => p)) + @" SqlMapFilePaths=" + string.Join(";", SqlMapFilePaths.Select(p => p)) + @" AutoMigrate=" + AutoMigrate + @" AutoRemoveUnuseColumnInTable=" + AutoRemoveUnuseColumnInTable + @" EnableAutoMigrateLog=" + EnableAutoMigrateLog + @" EnableAutoMigrateDebug=" + EnableAutoMigrateDebug + @" AutoMigrateOnContainTable=" + AutoMigrateOnContainTable + @" AutoMigrateWithoutTable=" + AutoMigrateWithoutTable + @" EnableGlobalIgnoreUpdatedColumns=" + EnableGlobalIgnoreUpdatedColumns + @" AutoFilterEmptyValueColumnsWhenTrack=" + AutoFilterEmptyValueColumnsWhenTrack + @" GlobalIgnoreUpdatedColumns=" + GlobalIgnoreUpdatedColumns + @" EnableCodeGen=" + EnableCodeGen + @" CodeGenType=" + CodeGenType + @" CodeGenBaseDirectory=" + CodeGenBaseDirectory + @" CodeGenClassNameMode=" + CodeGenClassNameMode + @" CodeGenPropertyNameMode=" + CodeGenPropertyNameMode + @" CodeGenProjectName=" + CodeGenProjectName + @" CodeGenNameSpace=" + CodeGenNameSpace + @" CodeGenTableFilter=" + CodeGenTableFilter + @" Interceptors=" + string.Join(";", Interceptors.Select(p => (p != null? p.ToString():""))) + @" MappingAssemblies=" + string.Join(";", MappingAssemblies.Select(p => (p != null ? p.ToString() : ""))) + @" DataSources=" + string.Join(";", DataSources.Select(p => p.Name + "_" + p.Type + "_" + p.Weight)) + @" CodeGenTemplates=" + string.Join(";", CodeGenTemplates.Select(p => p.Name + "_" + p.OutputType + "_" + p.Enabled + "_" + p.OutputDirectory)) + @" OutputAction=" + OutputAction + @" DbConnectionInit=" + (DbConnectionInit != null? DbConnectionInit.ToString():"") + @" -----------Load DatabaseConfig End-----------" + @"" ); //EnableConnectionPool = " + EnableConnectionPool + @" // EnableLogConnectionPool = " + EnableLogConnectionPool + @" // MinIdle = " + MinIdle + @" // MaxIdle = " + MaxIdle + @" // MaxTotal = " + MaxTotal + @" // InitialSize = " + InitialSize + @" // MaxWaitMillis = " + MaxWaitMillis + @" // TimeBetweenEvictionRunsMillis = " + TimeBetweenEvictionRunsMillis + @" // MinEvictableIdleTimeMillis = " + MinEvictableIdleTimeMillis + @" // SoftMinEvictableIdleTimeMillis = " + SoftMinEvictableIdleTimeMillis + @" // EnableRemoveAbandoned = " + EnableRemoveAbandoned + @" // RemoveAbandonedOnBorrow = " + RemoveAbandonedOnBorrow + @" // RemoveAbandonedOnMaintenance = " + RemoveAbandonedOnMaintenance + @" // RemoveAbandonedTimeout = " + RemoveAbandonedTimeout + @" // NumTestsPerEvictionRun = " + NumTestsPerEvictionRun + @" // ValidationQuery = " + ValidationQuery + @" // TestOnBorrow = " + TestOnBorrow + @" // TestOnCreate = " + TestOnCreate + @" // TestOnReturn = " + TestOnReturn + @" // TestWhileIdle = " + TestWhileIdle + @" }