DapperLib / DapperLib/Dapper

DynamicParameters - Type Mapping like Column Type Mapper with SqlMapper.ITypeMap

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

Hello,

I do have a legacy Database that have different naming convention to C#. The type mapping for the entity object are easy done with SqlMapper.ITypeMap interface. What is about the filter types? I would like to use an object as filter, but cannot map from C# property names to DB parameter names. Or do I miss some feature in dapper?
thanks

stored proc:

doSomething(param_1, param_2,..)

C#

class DoSomethingFilter{
    int FirstParameter {get;set;}
    string SecondParameter {get;set; }
}

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 reading SqlMapper.ITypeMap and the parameter-binding path used for object filters, then compare that with the column type-mapping behavior described in the issue. Done should support mapping DoSomethingFilter.FirstParameter and SecondParameter to stored-procedure names such as param_1 and param_2, with coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend-api-design, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.