DapperLib / DapperLib/Dapper.Contrib

Dapper.Contrib operations should accept an optional table name

Open
#8 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

There are scenarios where one could prefer specifiing the table name for that specific insert/update/etc.

My suggestion is to add an optional parameter that when not specified would make the methods work as they currently do.
If specified, the method then uses that table name.

I have considered to configure through SqlMapperExtensions.TableNameMapper, but it still is a problem if I need to insert the same entity in two different tables concurrently.

I'm willing to contribute

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 by locating the Dapper.Contrib insert, update, and related operation methods, then read how SqlMapperExtensions.TableNameMapper currently selects tables. Define the optional table-name behavior while preserving existing behavior when it is omitted, and verify the affected operations with the project's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.