File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/NetCoreKit.Infrastructure.EfCore.MySql Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ namespace NetCoreKit.Infrastructure.EfCore.MySql
66{
77 public sealed class DatabaseConnectionStringFactory : IDatabaseConnectionStringFactory
88 {
9- private readonly DbOptions _dbOption ;
9+ public DbOptions DbOptions { get ; }
1010
1111 public DatabaseConnectionStringFactory ( )
1212 {
1313 var config = ConfigurationHelper . GetConfiguration ( ) ;
1414 var dbSection = config . GetSection ( "Features:EfCore:MySqlDb" ) ;
15- _dbOption = new DbOptions {
15+ DbOptions = new DbOptions {
1616 ConnString = dbSection [ "ConnString" ] ,
1717 FQDN = dbSection [ "FQDN" ] ,
1818 Database = dbSection [ "Database" ] ,
@@ -24,22 +24,22 @@ public DatabaseConnectionStringFactory()
2424
2525 public DatabaseConnectionStringFactory ( IOptions < DbOptions > options )
2626 {
27- _dbOption = options . Value ;
27+ DbOptions = options . Value ;
2828 }
2929
3030 public string Create ( )
3131 {
32- var connPattern = _dbOption . ConnString ;
33- var connConfigs = _dbOption . FQDN ? . Split ( ':' ) ;
32+ var connPattern = DbOptions . ConnString ;
33+ var connConfigs = DbOptions . FQDN ? . Split ( ':' ) ;
3434 var fqdn = connConfigs ? . First ( ) ;
3535 var port = connConfigs ? . Except ( new [ ] { fqdn } ) . First ( ) ;
3636
3737 return string . Format (
3838 connPattern ,
3939 fqdn , port ,
40- _dbOption . UserName ,
41- _dbOption . Password ,
42- _dbOption . Database ) ;
40+ DbOptions . UserName ,
41+ DbOptions . Password ,
42+ DbOptions . Database ) ;
4343 }
4444 }
4545}
You can’t perform that action at this time.
0 commit comments