Dapper using type handler in useless case
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description

Type handler are very utile when used to cast column. But when used to cast entire entity, is useless:

I'm use the same type as a json column in another table and it works ok. The problem is that it conflicts because the type handler is also called if I use .Query<ProfessionalRepassCriteria>()
It makes no sense for the typehandler to be used to cast the entire entity, because an int (or any primitive type) cannot return an entire entity.

The typehandler's interface doesn't allow returning the int type in this case, so it's useless to call this typehandler for each column within the type.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the type-handler interface and the Query() reproduction first. No file or test is named, so trace where the handler is invoked for entity mapping and compare it with the JSON-column case. Done means entity queries no longer invoke an unusable handler while column conversions continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100