@@ -35,13 +35,13 @@ public static UpgradeEngineBuilder SqlDatabase(this SupportedDatabases supported
3535 /// Creates an upgrader for SQL Server databases.
3636 /// </summary>
3737 /// <param name="supported">Fluent helper type.</param>
38- /// <param name="connection">The sql connection. </param>
38+ /// <param name="connectionFactory">A func that create a new SqlConnection </param>
3939 /// <returns>
4040 /// A builder for a database upgrader designed for SQL Server databases.
4141 /// </returns>
42- public static UpgradeEngineBuilder SqlDatabase ( this SupportedDatabases supported , SqlConnection connection )
42+ public static UpgradeEngineBuilder SqlDatabase ( this SupportedDatabases supported , Func < SqlConnection > connectionFactory )
4343 {
44- return SqlDatabase ( supported , connection , null ) ;
44+ return SqlDatabase ( supported , connectionFactory , null ) ;
4545 }
4646
4747 /// <summary>
@@ -79,14 +79,14 @@ public static UpgradeEngineBuilder SqlDatabase(this SupportedDatabases supported
7979 /// Creates an upgrader for SQL Server databases.
8080 /// </summary>
8181 /// <param name="supported">Fluent helper type.</param>
82- /// <param name="connection">The sql connection. </param>
82+ /// <param name="connectionFactory">A func that create a new SqlConnection </param>
8383 /// <param name="schema">The SQL schema name to use. Defaults to 'dbo'.</param>
8484 /// <returns>
8585 /// A builder for a database upgrader designed for SQL Server databases.
8686 /// </returns>
87- public static UpgradeEngineBuilder SqlDatabase ( this SupportedDatabases supported , SqlConnection connection , string schema )
87+ public static UpgradeEngineBuilder SqlDatabase ( this SupportedDatabases supported , Func < SqlConnection > connectionFactory , string schema )
8888 {
89- return SqlDatabase ( new SqlConnectionManager ( connection ) , schema ) ;
89+ return SqlDatabase ( new SqlConnectionManager ( connectionFactory ) , schema ) ;
9090 }
9191
9292 /// <summary>
0 commit comments