@@ -21,30 +21,30 @@ public static string TryGetConnectionString(this IConfiguration configuration, s
2121 {
2222 if ( string . IsNullOrEmpty ( connectionStringName ) ) { throw new ArgumentNullException ( nameof ( connectionStringName ) ) ; }
2323
24- Console . WriteLine ( "Getting connection string '{ConnectionStringName }'..." , connectionStringName ) ;
24+ Console . WriteLine ( $ "Getting connection string '{ connectionStringName } '...") ;
2525 var connectionString = configuration . GetConnectionString ( connectionStringName ) ;
2626 if ( string . IsNullOrEmpty ( connectionString ) )
2727 {
28- Console . WriteLine ( "Not Found; Trying to get '{ConnectionStringName }' with Prefix..." , $ "CUSTOMCONNSTR_ { connectionStringName } ") ;
28+ Console . WriteLine ( $ "Not Found; Trying to get 'CUSTOMCONNSTR_ { connectionStringName } ' with Prefix...") ;
2929 connectionString = configuration . GetConnectionString ( $ "CUSTOMCONNSTR_{ connectionStringName } ") ;
3030 }
3131
3232 if ( string . IsNullOrEmpty ( connectionString ) )
3333 {
34- Console . WriteLine ( "Not Found; Trying to get '{ConnectionStringName }' from environment variables..." , connectionStringName ) ;
34+ Console . WriteLine ( $ "Not Found; Trying to get '{ connectionStringName } ' from environment variables...") ;
3535 connectionString = Environment . GetEnvironmentVariable ( connectionStringName ) ;
3636 }
3737
3838 if ( string . IsNullOrEmpty ( connectionString ) )
3939 {
40- Console . WriteLine ( "Not Found; Trying to get '{ConnectionStringName }' from environment variables with prefix..." , connectionStringName ) ;
40+ Console . WriteLine ( $ "Not Found; Trying to get '{ connectionStringName } ' from environment variables with prefix...") ;
4141 connectionString = Environment . GetEnvironmentVariable ( $ "CUSTOMCONNSTR_{ connectionStringName } ") ;
4242 }
4343
4444 // STILL NOT FOUND??!?!?
4545 if ( string . IsNullOrEmpty ( connectionString ) )
4646 {
47- Console . WriteLine ( "Connection string '{ConnectionStringName }' not found!" , connectionStringName ) ;
47+ Console . WriteLine ( $ "Connection string '{ connectionStringName } ' not found!") ;
4848 throw new ArgumentException ( $ "Unable to find connection string '{ connectionStringName } '") ;
4949 }
5050
0 commit comments