DapperLib / DapperLib/Dapper.Contrib

Does internal type property ignored?

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

I have and internal type property called code in my class to ignore it in JSON serialization in my API.
But this is ignored in insert/update as well by Dapper and the insert query throw error while the select works fine. Is there any setting I can use in Dapper to map internal types?

public class User
{
  public int id {get; set;}
  public string name {get; set;}
  internal string code {get; set;}
}

or any other types like which is mapped in select, insert and update while can be ignored by JSON serialization.

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

The issue names no repository files or tests. Start by reproducing the shown User class and comparing Dapper.Contrib's select, insert, and update behavior for the internal code property. Done requires a decided mapping behavior and a verified outcome for all three operations.

Written by the indexing model from the issue text.

Assessment

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