Support objects for raw sql parameters & array parameters
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
No files, tests, or entry points are named in the issue. Begin by locating EF Core's raw SQL parameter entry points and comparing their current behavior with the requested Dapper-style object and array parameters. Done means supporting named object properties and array parameters for IN clauses.
Written by the indexing model from the issue text.
Description
Since EF core's goal is to reduce the amount of scenarios to resort to including Dapper for supporting raw sql support, I would suggest EF core implementing these features from Dapper:
- dapper allows to specify named arguments in SQL queries as objects (both typed or anonymous). The names of the properties of the object are used to declare SQL variable (e.g. declare @id int = 14) so you can use these names inside the raw sql to reference the passed sql parameters)
- dapper also allows the properties of a parameter object to be an array type, so they can be used in 'in clause' (dapper implements this apparently by defining multiple declare vars one for each element in the array and automatically inserts these vars inside an 'in clause').
- named vars greatly improves the readability of the raw sql ( one can use names instead of string interpolation with numbers {0}, {1} ...
- the advantage also is that generate sql can be copy and pasted in SQL running without modifications
- 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