Repository navigation
AddParam(name, DbType, direction) works on the SQL Server commands, so an output parameter no longer carries the enum as its value - #89
Merged
Conversation
…s, so an output parameter no longer sends the enum as its value Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On ExpressiveSqlCommand (System.Data.SqlClient and Microsoft.Data.SqlClient) the database type is SqlDbType, so AddParam("@o", DbType.Int32, ParameterDirection.Output) bound to the object overload and sent the DbType enum as the parameter VALUE.
This adds AddParam(string, DbType, ParameterDirection) and AddParamIf(bool, string, DbType, ParameterDirection) to both commands. The DbType is converted to the SqlDbType the provider maps it to, and the parameter has no value (NULL of that type for input or input-output). The direction has no default on purpose, so a literal 0 still means a value.
Tests: SqlServerParameterTypeTests covers both packages (the second through an extern alias) and pins the calls that must keep their meaning, a literal 0 above all. The test project reference to Microsoft.Data.SqlClient gets Aliases="mssql" for that.
Verified: 0 warnings and 0 errors in Release and Debug, 8737 tests pass in both, 86 sample checks, DocFX 0 warnings, style and analyzers 0 findings.
🤖 Generated with Claude Code