File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
T4SQLTemplateLibrary/SqlBuilder/DataAccess Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ static partial void OnInitializing()
1616 {
1717 _ConnectionSettingKey = "T4SQLDB" ;
1818 _PackageSettingKey = "Engine_Package" ;
19+ _AuxConnectionSettingKey = null ;
1920 }
2021 }
2122}
Original file line number Diff line number Diff line change @@ -56,9 +56,12 @@ static ConfigHelper()
5656 if ( _DatabasePackage == null )
5757 _DatabasePackage = string . Empty ;
5858
59- connSetting = ConfigurationManager . ConnectionStrings [ _AuxConnectionSettingKey ] ;
60- _AuxDbProviderFactory = DbProviderFactories . GetFactory ( connSetting . ProviderName ) ;
61- _AuxConnectionString = connSetting . ConnectionString ;
59+ if ( string . IsNullOrWhiteSpace ( _AuxConnectionSettingKey ) == false )
60+ {
61+ connSetting = ConfigurationManager . ConnectionStrings [ _AuxConnectionSettingKey ] ;
62+ _AuxDbProviderFactory = DbProviderFactories . GetFactory ( connSetting . ProviderName ) ;
63+ _AuxConnectionString = connSetting . ConnectionString ;
64+ }
6265 #endregion
6366
6467 OnInitialized ( ) ;
You can’t perform that action at this time.
0 commit comments