Skip to content

Commit

Permalink
Update MicrosoftSQLTableHelper.cs
Browse files Browse the repository at this point in the history
Check connection is open before using it
  • Loading branch information
jas88 committed Aug 16, 2024
1 parent d3ce436 commit 038babb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public override void DropColumn(DbConnection connection, DiscoveredColumn column
public override IEnumerable<DiscoveredParameter> DiscoverTableValuedFunctionParameters(DbConnection connection,
DiscoveredTableValuedFunction discoveredTableValuedFunction, DbTransaction? transaction)
{
if (connection.State != ConnectionState.Open)
throw new ArgumentException($@"Connection state was {connection.State} but had to be Open", nameof(connection));

const string query = """
select
sys.parameters.name AS name,
Expand Down

0 comments on commit 038babb

Please sign in to comment.