zzzprojects / Dapper-Plus

Dapper Plus - High-Efficient Bulk Actions (Insert, Update, Delete, and Merge) for .NET
https://dapper-plus.net/
384 stars 85 forks source link

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

Open dbenjimanraj opened 3 years ago

dbenjimanraj commented 3 years ago

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

JonathanMagnan commented 3 years ago

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 commented 3 years ago

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

dbenjimanraj commented 3 years ago

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

Best regards, Ben

JonathanMagnan commented 3 years ago

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