DapperLib / DapperLib/Dapper

Ability to throw when a column is unmapped

Open
#1,620 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

The most common source of bugs we seem to have with Dapper is when the type property names go out of sync with the column names in query text. Please expose an API setting that turns on a mode that throws an exception when one of the columns ends up being discarded, or possibly an interception API or event so that the app can implement/override/handle and choose to throw.

Happy to submit 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

Start by tracing Dapper's existing column-to-property mapping behavior and configuration APIs, using the reported mismatch scenario as a reproduction. Compare an opt-in throwing setting with interception or event handling, then add coverage for discarded columns and verify existing mappings remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
api, backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.