From ef706867a2bae54d3b4d9088bd388493f4dd74cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Mar 2026 19:19:14 +0000 Subject: [PATCH 1/2] fix: make connection optional when literal connection string is configured When SqlCommandProvider or SqlProgrammabilityProvider is configured with a literal connection string at design time, the connection parameter in the generated constructor/factory method was incorrectly required. This meant users had to pass an open SqlConnection even when a literal connection string was available. The fix makes the connection parameter always optional (defaulting to null). The existing body2 logic already handles null by falling back to the design-time connection string expression, so no further changes are needed. Users can now call: AdventureWorks.CreateCommand<"SELECT ...">().Execute() instead of having to first open a SqlConnection. Closes #245 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/SqlClient.DesignTime/DesignTime.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SqlClient.DesignTime/DesignTime.fs b/src/SqlClient.DesignTime/DesignTime.fs index ac5c6a07..c8fb7454 100644 --- a/src/SqlClient.DesignTime/DesignTime.fs +++ b/src/SqlClient.DesignTime/DesignTime.fs @@ -652,7 +652,7 @@ type DesignTime private() = ProvidedParameter( "connection", typeof, - ?optionalValue = if designTimeConnectionString.IsDefinedByLiteral then None else Some null + ?optionalValue = Some null ) ProvidedParameter("transaction", typeof, optionalValue = null) ProvidedParameter("commandTimeout", typeof, optionalValue = SqlCommand.DefaultTimeout) From bc3cc6e78120428e46ff09fe95da8fb447ee04e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Mar 2026 19:24:04 +0000 Subject: [PATCH 2/2] ci: trigger checks