DapperLib / DapperLib/Dapper.Contrib

Contrib: Why is the id parameter of the Get method dynamic?

Open
#78 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
293
Forks
109
PR merge metrics
No merged PRs in 30d

Description

Is there any reason why the id parameter of the Get and GetAsync methods is a dynamic instead of a simple object? The only place where the parameter is used in the method is in a call to DynamicParameters.Add which just expects an object.

Although there is a small performance difference, my main intention here is clean code.

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 the Get and GetAsync method signatures mentioned in the issue, then inspect their DynamicParameters.Add calls. Change only the id parameter type from dynamic to object and verify that the project still builds and its existing tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Refactor
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.