Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

SqlMapper.AddTypeHandler Parse Method Not being Invoked.

Open KarltonKemerait opened this issue 2 years ago • 4 comments

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

KarltonKemerait avatar Jun 11 '23 16:06 KarltonKemerait

I deleted the original code from the post and instead created a small sample project which demonstrates the issue.

KarltonKemerait avatar Jun 11 '23 21:06 KarltonKemerait

Anyone reading these?

KarltonKemerait avatar Jun 15 '23 02:06 KarltonKemerait

Yes, multiple people (but mostly: me), however at the current time I have not had an opportunity to investigate this, let alone change anything, so: there was nothing to respond with. Ultimately this isn't my day job, and we don't have a support agreement to answer you in X time, or at all. The code is there if you want to investigate, or it can wait on my availability. Right now, most of my spare time has been going towards the "next steps" for Dapper (see https://github.com/DapperLib/Dapper/issues/1909), although by design that doesn't impact how the existing library behaves.

Short answer, then (too late) "yes, I've seen this; I don't have an answer right now, as I haven't had time to investigate"

mgravell avatar Jun 15 '23 10:06 mgravell

That's quite alright I completely understand and appreciate your effort. I was just wondering because I didn't see any comments. Take your time and don't forget to take a day off now and then!! LOL Thanks!

KarltonKemerait avatar Jun 15 '23 13:06 KarltonKemerait