DapperLib / DapperLib/Dapper

ulong support please :) For MSSQL

Open
#2,110 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

Hellos,

I ran across this issue when trying to pass a ulong to MSSQL stored procedure via Dapper. I am running across an issue of storing a Steam Id (from Steamworks) to the database. it is of the ulong data type (max: 18,446,744,073,709,551,615). The easiest way to replicate the issue:

  1. Create a table with a field type of Numeric (20,0).
  2. Create a stored procedure that accepts a parameter type of Numeric(20, 0).
  3. Call stored procedure from Dapper, passing along a ulong.

You will get the following exception:

System.ArgumentException: 'The parameter data type of UInt64 is invalid.'

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

Reproduce the issue using a Numeric(20,0) column, a stored procedure with a Numeric(20,0) parameter, and a Dapper call passing a ulong. Start by tracing Dapper's parameter handling for UInt64; done means the stored procedure accepts the ulong without the invalid-parameter exception.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.