DapperLib / DapperLib/Dapper

"param11" replace "param1"

Open
#1,768 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

sql :“Select Id from table where Id in @Param1 ” parameters: {param1:"param1",param11:"param11"}

使用query方法和以上两个参数 得到的结果却是 Select Id from table1 where Id in param11 ,很奇怪 本该使用param1 作为参数却变成了param11
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Dapper's query method and the parameter replacement path described in the issue. Reproduce the SQL with param1 and param11, then trace why param1 is replaced by param11; done means the intended parameter is selected without changing the other parameter's behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.