DapperLib / DapperLib/Dapper

SqlMapper.AddTypeHandler Parse Method Not being Invoked.

Open
#1,915 4 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

VB.Net Windows desktop application, Dapper 2.0.123 Dapper.Contrib 2.0.78

Even though the TypeHandler is registered on app startup. Cx.Get(of T) - Fails saying unable to parse the column containing the UDT and the Parse Method of the TypeHandler is NEVER invoked. I CAN do an insert without any issues and the SetValue() Method IS invoked. Very odd behavior.

I have built a small sample vb.net app to demonstrate the problem. Inside the VB.Net app is a text file with the SQL script for creating the DB and Table (I also included a backup of the database if that's easier)

DapperExample - TypeHandler.zip
UDTTesting - Copy.zip

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

Reproduce the failure with the attached DapperExample - TypeHandler.zip or UDTTesting - Copy.zip, starting at SqlMapper.AddTypeHandler and the Cx.Get(of T) call. Compare the registered handler's Parse and SetValue paths against the included SQL setup; done means the sample retrieves the UDT without the parse error and demonstrates the relevant handler behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.