Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: AsSplitQuery with FromSql Containing output DbParameter #22498

Open
Tracked by #21888
smitpatel opened this issue Sep 11, 2020 · 1 comment
Open
Tracked by #21888

Query: AsSplitQuery with FromSql Containing output DbParameter #22498

smitpatel opened this issue Sep 11, 2020 · 1 comment

Comments

@smitpatel
Copy link
Contributor

#11370 when DbParameter direction is something other than Input

Also see #22483

The main issue, same DbParameter which user supplied to us cannot be added to multiple DbCommand.
For Input parameter, we added fix which is just to clone the DbParameter so that each command gets new DbParameter with same info.
Above fix is not possible for parameters which are output or inputoutput since the value updated after executing db command need to be reflected in the user created DbParameter which we have no way of doing.
Based on conversation #22485 (comment) and suggestion by @bricelam
We can actually make it work, if we know when to clone for additional queries. In that case, we will send first query with user supplied DbParameter and additional queries with cloned parameters. So first query will always update value and give back correct values to user.

@ajcvickers
Copy link
Member

Putting this on the backlog for now to gather votes/feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants