Skip to content

Allow use of an existing SQL Connection#31

Merged
droyad merged 3 commits intomainfrom
use-sql-connection
Feb 23, 2026
Merged

Allow use of an existing SQL Connection#31
droyad merged 3 commits intomainfrom
use-sql-connection

Conversation

@droyad
Copy link
Member

@droyad droyad commented Feb 23, 2026

Pick of #576 into this repo and update to match latest code base

This pull request adds support for passing an existing SqlConnection to the SqlConnectionManager and SqlServerExtensions.SqlDatabase methods, enabling more flexible connection management when upgrading SQL Server databases. This enhancement allows consumers to reuse existing connections, which can be useful for advanced scenarios such as connection pooling or custom authentication.

Support for existing SqlConnection:

  • Added a new constructor to SqlConnectionManager that accepts an existing SqlConnection object, allowing direct management of externally-created connections. [1] [2]
  • Added two new overloads to SqlServerExtensions.SqlDatabase:
    • One that accepts a SqlConnection (without schema), and
    • One that accepts a SqlConnection and a schema string, both returning an UpgradeEngineBuilder for SQL Server upgrades. [1] [2] [3]

ipinak and others added 3 commits February 18, 2026 14:09
Updated SqlConnectionManager and SqlServerExtensions to allow an
existing SqlConnection to be used for migrating
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants