Query: AsSplitQuery with FromSql Containing output DbParameter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing issues #11370 and #22483, then read the discussion on pull request #22485 for the proposed handling of output and input-output DbParameters. Trace how split queries create additional commands. Done means the first query updates the user-supplied parameter while additional queries use compatible cloned parameters.
Written by the indexing model from the issue text.
Description
#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 https://github.com/dotnet/efcore/pull/22485#discussion_r486678848 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.
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/efcore
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
customer-reported
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
area-cosmos area-vector-search
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-cosmos
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-tools needs-design
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100