DapperLib / DapperLib/Dapper

Allow custom Command creation

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

There is a use case requested to bake in EF Sql Retry logic discussed in #1864. However to do so requires a Property on the IDbCommand to be set. Using only connection.CreateCommand in the CommandDefinition does not allow this to happen.

Please add a new ctor that takes in a Func<IDbConnection, IDbCommand> createCommand delegate and use that if provided in the SetupCommand method.

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 CommandDefinition and the SetupCommand method mentioned in the issue. Trace how commands are currently created, then verify that a supplied IDbConnection-to-IDbCommand delegate is used while the existing connection.CreateCommand path remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.