Skip to content

Conversation

NandanDevHub
Copy link

This change fixes an issue where QueryMultiple and QueryMultipleAsync only invoked OnCompleted when parameters were of type DynamicParameters.
If a caller provided a custom parameter type that implemented IParameterCallbacks, the callbacks were ignored.

Changes Below:

  • Updated both sync and async code paths to cast command.bParameters to IParameterCallbacks instead of DynamicParameters.

  • Added unit tests to confirm that OnCompleted is now called for custom parameter objects in both sync and async scenarios.

What i found locally is :

  • Existing behavior with DynamicParameters is unchanged.

  • Custom implementations of IParameterCallbacks now work correctly.

Fixes #2179.

…erCallbacks and add tests for QueryMultiple and QueryMultipleAsync to verify OnCompleted behavior.
@NandanDevHub
Copy link
Author

I added another small commit to adjust the new tests, reason being that AppVeyor CI doesn’t have SQL Server available, so the first version of the tests failed there.

With this update, the tests still run and pass locally when a database is present, but they no-op cleanly in CI without causing failures.

@NandanDevHub
Copy link
Author

Hi, just checking in to see if there’s any feedback or change you’d like here. I had eariler checked locally with SQL Server the fix works for both sync and async paths, i would love to make any small changes if needed.

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.

Possible bug: GridReader constructor uses DynamicParameters cast instead of IParameterCallbacks

1 participant