C# guid[] in oracle caused System.ArgumentException:value does not fall within the expected range
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
when i use dapper with oracle database. and tranform Guid[] with IN operator
code bellow
`
var sqlBuilder = new StringBuilder()
.Append(" SELECT w."CourseId", c."Title", c."CourseComment", c."CategoryName", (case c."Type" WHEN 1 THEN N'综合类' ELSE N'专题类' end) as "CourseType"")
.Append(" FROM "tb_Violation_Item_KeyWord" k")
.Append(" Left Join "v_AllCourseKeyWords" w")
.Append(" ON w."CourseKeyWordId" = k."CourseKeyWordId"")
.Append(" Left Join "v_AllCourse" c")
.Append(" ON c."CourseId" = w."CourseId"")
.Append(" WHERE k."ItemId" in (:Ids)")
.Append(" and c."State" =1");
var x = (from id in req.Ids select id).ToList();
return WebQuery<dynamic>(sqlBuilder.ToString(), new { Ids = x});
`
and the parameter req is
public class IdListRequest
{
public Guid[] Ids { get; set; }
}
when i executed the query, i got an error : value does not fall within the expected range
i have taken snap

please pay attention to this problem.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reproducing the shown WebQuery call against Oracle with the IdListRequest.Guid[] value and the IN (:Ids) query. Inspect how Dapper binds this parameter and compare the provider error with the generated command details. Done means the cause of the exception is confirmed and the supported behavior or required change is clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100