DapperLib / DapperLib/Dapper.Contrib

Expand CommandDefinition.OnCompleted to pass the DBCommand (allow for items like mysql last insert id to be fetched easier)

Open
#105 2 comments 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

There is OnCompleted currently which executes after a command is finished. It would be nice if we changed this handler to allow specifying a function to take the DbCommand itself.
This would be useful for things like MySQL which then have .LastInsertedId as part of the command available.

This is in part a possible fix to DapperLib/Dapper.Contrib#63 to allow it to use lasterinsertedid. If this sounds like a good option I can generate a PR.

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

Read the existing OnCompleted implementation and its DbCommand execution path; no file or test is named in the issue. Confirm how the completion callback is declared and invoked, then verify that a MySQL caller can access LastInsertedId from the completed command.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, mysql
Domain
databases
Issue type
Feature
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.