File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,26 +84,32 @@ public IDatabaseContext Create()
8484 Resources . DatabaseContextFactoryNotConfiguredException , GetType ( ) . FullName ) ) ;
8585 }
8686
87- public void ConfigureWith ( string connectionStringName )
87+ public IDatabaseContextFactory ConfigureWith ( string connectionStringName )
8888 {
8989 ClearConfiguredValues ( ) ;
9090
9191 _connectionStringName = connectionStringName ;
92+
93+ return this ;
9294 }
9395
94- public void ConfigureWith ( string providerName , string connectionString )
96+ public IDatabaseContextFactory ConfigureWith ( string providerName , string connectionString )
9597 {
9698 ClearConfiguredValues ( ) ;
9799
98100 _providerName = providerName ;
99101 _connectionString = connectionString ;
102+
103+ return this ;
100104 }
101105
102- public void ConfigureWith ( IDbConnection dbConnection )
106+ public IDatabaseContextFactory ConfigureWith ( IDbConnection dbConnection )
103107 {
104108 ClearConfiguredValues ( ) ;
105109
106110 _dbConnection = dbConnection ;
111+
112+ return this ;
107113 }
108114
109115#if ( ! NETCOREAPP2_0 && ! NETSTANDARD2_0 )
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ public interface IDatabaseContextFactory
99 IDatabaseContext Create ( string providerName , IDbConnection dbConnection ) ;
1010 IDatabaseContext Create ( ) ;
1111
12- void ConfigureWith ( string connectionStringName ) ;
13- void ConfigureWith ( string providerName , string connectionString ) ;
14- void ConfigureWith ( IDbConnection dbConnection ) ;
12+ IDatabaseContextFactory ConfigureWith ( string connectionStringName ) ;
13+ IDatabaseContextFactory ConfigureWith ( string providerName , string connectionString ) ;
14+ IDatabaseContextFactory ConfigureWith ( IDbConnection dbConnection ) ;
1515
1616 IDbConnectionFactory DbConnectionFactory { get ; }
1717 IDbCommandFactory DbCommandFactory { get ; }
You can’t perform that action at this time.
0 commit comments