DapperLib / DapperLib/Dapper

Get type which was added with AddTypeMap

Open
#798 5 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

I can add a custom type mapping with AddTypeMap method, but how can I get it back if I want to check that a mapping is really there?

It seems like GetTypeMap is the right thing to call, but it works with a different collection.

  1. How can I check that my mapping was added?

  2. Is it correct that GetTypeMap and AddTypeMap are not working with the same collection?

  3. As I can see, SetTypeMap will add my custom mapping and I can retrieve it with GetTypeMap later. Is it the correct way to accomplish my goal? I want to map C# DateTime type to DateTime2 SQL Server type.

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 the AddTypeMap, GetTypeMap, and SetTypeMap entry points and tracing which type-map collections each uses. Compare their behavior for a C# DateTime to DateTime2 mapping; done means the supported way to verify a mapping is established and the behavior is covered by an appropriate test or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
api, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.