Dapper-Plus icon indicating copy to clipboard operation
Dapper-Plus copied to clipboard

Can't write CLR type NodaTime.LocalDate with handler type DateHandler

Open dbenjimanraj opened this issue 4 years ago • 4 comments

We are getting exception(Can't write CLR type NodaTime.LocalDate with handler type DateHandler) while doing BulkInsert referring to the same approach in https://github.com/zzzprojects/Dapper-Plus/issues/78

dbenjimanraj avatar Jun 21 '21 21:06 dbenjimanraj

Hello @dbenjimanraj ,

Could you try to add all your Noda type using the method AddCustomSupportedType such as

DapperPlusManager.AddCustomSupportedType(typeof(NodaTime.LocalDate));

We currently support by default only NodaTime.LocalDateTime and NodaTime.ZonedDateTime, other type must currently be registered.

Let me know if that worked

Best Regards,

Jon

JonathanMagnan avatar Jun 22 '21 13:06 JonathanMagnan

Hello @dbenjimanraj ,

Since our last conversation, we haven't heard from you!

Did you get the time to try the method AddCustomSupportedType ?

Let us know if that worked,

Best regards,

Jon

JonathanMagnan avatar Jun 24 '21 12:06 JonathanMagnan

Hello Jon, I've tried AddCustomSupportedType method it worked for me. Thank you alot.

Best regards, Ben

dbenjimanraj avatar Jun 25 '21 11:06 dbenjimanraj

Awesome @dbenjimanraj !

We are glad to hear that the method works for you!

Don't hesitate to contact us with any questions, issues, or feedback.

Best regards,

Jon

JonathanMagnan avatar Jun 25 '21 12:06 JonathanMagnan