Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Nullable types not supported #4

Open
lundmikkel opened this issue Sep 20, 2018 · 3 comments
Open

Nullable types not supported #4

lundmikkel opened this issue Sep 20, 2018 · 3 comments

Comments

@lundmikkel
Copy link

When retrieving a nullable type, say Instant?, and the result from the database is actually null (System.DBNULL), an exception is thrown with the message "Cannot convert System.DBNULL to NodaTime.Instant".

It seems that in order to support nullable types, a new set of type handlers has to be added. I've forked the problem and made a proposal, which seems to work. It hasn't, however, been tested yet (couldn't quite figure the test setup), so I haven't made a PR just yet.

@lundmikkel
Copy link
Author

It is possible to create a class with a nullable property and use that, but it seems excessive to have have to make a whole wrapper class just for a simple nullable value.

@carlos0202
Copy link

It is possible to create a class with a nullable property and use that, but it seems excessive to have have to make a whole wrapper class just for a simple nullable value.

Hi @lundmikkel , I think this library is no longer maintained. Were you able to fix your issue completely? I mean, is there any other working alternative, or you just resorted on yours?

@lundmikkel
Copy link
Author

@carlos0202 Must admit I haven't used this for a long time. I'm not sure how I ended solving this, since it was in a previous job, where I don't have access to the code any longer. Sorry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants